Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-21 11:00:56 +0300
committerJunio C Hamano <gitster@pobox.com>2007-11-21 11:00:56 +0300
commitd794d9e70ebb8c767b04f25c03290ef305cd31ab (patch)
tree94b449643ef448eded6b3000400871913b7c0182 /git-gui/lib/transport.tcl
parent183f84365de7b4b1fe0e15cebce80a95023aa1d6 (diff)
parent41188dd1a837df08a959b63a2f56357971fa4549 (diff)
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: (96 commits) git-gui 0.9.0 git-gui: Bind Meta-T for "Stage To Commit" menu action git-gui: Allow users to set font weights to bold git-gui: Update Japanese strings (part 2) git-gui: Update Japanese strings Updated russian translation of git-gui po2msg: actually output statistics po2msg: ignore untranslated messages po2msg: ignore entries marked with "fuzzy" git-gui: Protect against bad translation strings git-gui: Make sure we get errors from git-update-index More updates and corrections to the russian translation of git-gui Updated Russian translation. git-gui: Update German translation git-gui: Add more terms to glossary. git-gui: Paper bag fix the global config parsing git-gui: Honor a config.mak in git-gui's top level git-gui: Collapse $env(HOME) to ~/ in recent repositories on Windows git-gui: Support cloning Cygwin based work-dirs git-gui: Use proper Windows shortcuts instead of bat files ...
Diffstat (limited to 'git-gui/lib/transport.tcl')
-rw-r--r--git-gui/lib/transport.tcl48
1 files changed, 29 insertions, 19 deletions
diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl
index 3a22bd40d4..8e6a9d0a60 100644
--- a/git-gui/lib/transport.tcl
+++ b/git-gui/lib/transport.tcl
@@ -3,8 +3,8 @@
proc fetch_from {remote} {
set w [console::new \
- "fetch $remote" \
- "Fetching new changes from $remote"]
+ [mc "fetch %s" $remote] \
+ [mc "Fetching new changes from %s" $remote]]
set cmds [list]
lappend cmds [list exec git fetch $remote]
if {[is_config_true gui.pruneduringfetch]} {
@@ -15,15 +15,15 @@ proc fetch_from {remote} {
proc prune_from {remote} {
set w [console::new \
- "remote prune $remote" \
- "Pruning tracking branches deleted from $remote"]
+ [mc "remote prune %s" $remote] \
+ [mc "Pruning tracking branches deleted from %s" $remote]]
console::exec $w [list git remote prune $remote]
}
proc push_to {remote} {
set w [console::new \
- "push $remote" \
- "Pushing changes to $remote"]
+ [mc "push %s" $remote] \
+ [mc "Pushing changes to %s" $remote]]
set cmd [list git push]
lappend cmd -v
lappend cmd $remote
@@ -32,6 +32,7 @@ proc push_to {remote} {
proc start_push_anywhere_action {w} {
global push_urltype push_remote push_url push_thin push_tags
+ global push_force
set r_url {}
switch -- $push_urltype {
@@ -45,6 +46,9 @@ proc start_push_anywhere_action {w} {
if {$push_thin} {
lappend cmd --thin
}
+ if {$push_force} {
+ lappend cmd --force
+ }
if {$push_tags} {
lappend cmd --tags
}
@@ -64,8 +68,8 @@ proc start_push_anywhere_action {w} {
}
set cons [console::new \
- "push $r_url" \
- "Pushing $cnt $unit to $r_url"]
+ [mc "push %s" $r_url] \
+ [mc "Pushing %s %s to %s" $cnt $unit $r_url]]
console::exec $cons $cmd
destroy $w
}
@@ -76,26 +80,27 @@ trace add variable push_remote write \
proc do_push_anywhere {} {
global all_remotes current_branch
global push_urltype push_remote push_url push_thin push_tags
+ global push_force
set w .push_setup
toplevel $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
- label $w.header -text {Push Branches} -font font_uibold
+ label $w.header -text [mc "Push Branches"] -font font_uibold
pack $w.header -side top -fill x
frame $w.buttons
- button $w.buttons.create -text Push \
+ button $w.buttons.create -text [mc Push] \
-default active \
-command [list start_push_anywhere_action $w]
pack $w.buttons.create -side right
- button $w.buttons.cancel -text {Cancel} \
+ button $w.buttons.cancel -text [mc "Cancel"] \
-default normal \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.source -text {Source Branches}
+ labelframe $w.source -text [mc "Source Branches"]
listbox $w.source.l \
-height 10 \
-width 70 \
@@ -112,10 +117,10 @@ proc do_push_anywhere {} {
pack $w.source.l -side left -fill both -expand 1
pack $w.source -fill both -expand 1 -pady 5 -padx 5
- labelframe $w.dest -text {Destination Repository}
+ labelframe $w.dest -text [mc "Destination Repository"]
if {$all_remotes ne {}} {
radiobutton $w.dest.remote_r \
- -text {Remote:} \
+ -text [mc "Remote:"] \
-value remote \
-variable push_urltype
eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
@@ -130,7 +135,7 @@ proc do_push_anywhere {} {
set push_urltype url
}
radiobutton $w.dest.url_r \
- -text {Arbitrary URL:} \
+ -text [mc "Arbitrary URL:"] \
-value url \
-variable push_urltype
entry $w.dest.url_t \
@@ -150,25 +155,30 @@ proc do_push_anywhere {} {
grid columnconfigure $w.dest 1 -weight 1
pack $w.dest -anchor nw -fill x -pady 5 -padx 5
- labelframe $w.options -text {Transfer Options}
+ labelframe $w.options -text [mc "Transfer Options"]
+ checkbutton $w.options.force \
+ -text [mc "Force overwrite existing branch (may discard changes)"] \
+ -variable push_force
+ grid $w.options.force -columnspan 2 -sticky w
checkbutton $w.options.thin \
- -text {Use thin pack (for slow network connections)} \
+ -text [mc "Use thin pack (for slow network connections)"] \
-variable push_thin
grid $w.options.thin -columnspan 2 -sticky w
checkbutton $w.options.tags \
- -text {Include tags} \
+ -text [mc "Include tags"] \
-variable push_tags
grid $w.options.tags -columnspan 2 -sticky w
grid columnconfigure $w.options 1 -weight 1
pack $w.options -anchor nw -fill x -pady 5 -padx 5
set push_url {}
+ set push_force 0
set push_thin 0
set push_tags 0
bind $w <Visibility> "grab $w; focus $w.buttons.create"
bind $w <Key-Escape> "destroy $w"
bind $w <Key-Return> [list start_push_anywhere_action $w]
- wm title $w "[appname] ([reponame]): Push"
+ wm title $w [append "[appname] ([reponame]): " [mc "Push"]]
tkwait window $w
}