}
proc pull_remote {remote branch} {
+ if {![lock_index update]} return
set w [new_console "pull $remote $branch" \
"Pulling new changes from branch $branch in $remote"]
set cmd [list git pull]
}
proc post_pull_remote {remote branch success} {
+ unlock_index
if {$success} {
update_status "Successfully pulled $branch from $remote."
} else {
}
proc populate_pull_menu {m} {
- global gitdir repo_config all_remotes mainfont
+ global gitdir repo_config all_remotes mainfont disable_on_lock
foreach remote $all_remotes {
set rb {}
-label "Branch $rb_short from $remote..." \
-command [list pull_remote $remote $rb] \
-font $mainfont
+ lappend disable_on_lock \
+ [list $m entryconf [$m index last] -state]
}
}
}
# -- Options Menu
menu .mbar.options
-.mbar.options add checkbutton -label {Trust File Modification Timestamp} \
+.mbar.options add checkbutton -label {Trust File Modification Timestamps} \
-offvalue false \
-onvalue true \
-variable cfg_trust_mtime