#
if {[string match {@@@ *} $line]} {set is_3way_diff 1}
- if {[string match {index *} $line]} {
+ if {[string match {index *} $line]
+ || [regexp {^\* Unmerged path } $line]} {
set tags {}
} elseif {$is_3way_diff} {
set op [string range $line 0 1]
}
}
if {!$files_ready} {
- error_popup {No changes to commit.
+ info_popup {No changes to commit.
You must add at least 1 file before you can commit.
}
}
}
+proc all_tracking_branches {} {
+ global tracking_branches
+
+ set all_trackings [list]
+ foreach b [array names tracking_branches] {
+ regsub ^refs/(heads|remotes)/ $b {} b
+ lappend all_trackings $b
+ }
+ return [lsort -unique $all_trackings]
+}
+
proc do_create_branch_action {w} {
global all_heads null_sha1
global create_branch_checkout create_branch_revtype
}
proc do_create_branch {} {
- global all_heads current_branch tracking_branches
+ global all_heads current_branch
global create_branch_checkout create_branch_revtype
global create_branch_head create_branch_trackinghead
grid columnconfigure $w.desc 1 -weight 1
pack $w.desc -anchor nw -fill x -pady 5 -padx 5
- set all_trackings [list]
- foreach b [array names tracking_branches] {
- regsub ^refs/(heads|remotes)/ $b {} b
- lappend all_trackings $b
- }
- set all_trackings [lsort -unique $all_trackings]
- if {$all_trackings ne {}} {
- set create_branch_trackinghead [lindex $all_trackings 0]
- }
-
labelframe $w.from \
-text {Starting Revision} \
-font font_ui
-font font_ui
eval tk_optionMenu $w.from.head_m create_branch_head $all_heads
grid $w.from.head_r $w.from.head_m -sticky w
- radiobutton $w.from.tracking_r \
- -text {Tracking Branch:} \
- -value tracking \
- -variable create_branch_revtype \
- -font font_ui
- eval tk_optionMenu $w.from.tracking_m \
- create_branch_trackinghead \
- $all_trackings
- grid $w.from.tracking_r $w.from.tracking_m -sticky w
+ set all_trackings [all_tracking_branches]
+ if {$all_trackings ne {}} {
+ set create_branch_trackinghead [lindex $all_trackings 0]
+ radiobutton $w.from.tracking_r \
+ -text {Tracking Branch:} \
+ -value tracking \
+ -variable create_branch_revtype \
+ -font font_ui
+ eval tk_optionMenu $w.from.tracking_m \
+ create_branch_trackinghead \
+ $all_trackings
+ grid $w.from.tracking_r $w.from.tracking_m -sticky w
+ }
radiobutton $w.from.exp_r \
-text {Revision Expression:} \
-value expression \
pack $w.list.l -fill both -pady 5 -padx 5
pack $w.list -fill both -pady 5 -padx 5
- set all_trackings [list]
- foreach b [array names tracking_branches] {
- regsub ^refs/(heads|remotes)/ $b {} b
- lappend all_trackings $b
- }
- set all_trackings [lsort -unique $all_trackings]
- if {$all_trackings ne {} && $delete_branch_trackinghead eq {}} {
- set delete_branch_trackinghead [lindex $all_trackings 0]
- }
-
labelframe $w.validate \
-text {Delete Only If} \
-font font_ui
-font font_ui
eval tk_optionMenu $w.validate.head_m delete_branch_head $all_heads
grid $w.validate.head_r $w.validate.head_m -sticky w
- radiobutton $w.validate.tracking_r \
- -text {Merged Into Tracking Branch:} \
- -value tracking \
- -variable delete_branch_checktype \
- -font font_ui
- eval tk_optionMenu $w.validate.tracking_m \
- delete_branch_trackinghead \
- $all_trackings
- grid $w.validate.tracking_r $w.validate.tracking_m -sticky w
+ set all_trackings [all_tracking_branches]
+ if {$all_trackings ne {}} {
+ set delete_branch_trackinghead [lindex $all_trackings 0]
+ radiobutton $w.validate.tracking_r \
+ -text {Merged Into Tracking Branch:} \
+ -value tracking \
+ -variable delete_branch_checktype \
+ -font font_ui
+ eval tk_optionMenu $w.validate.tracking_m \
+ delete_branch_trackinghead \
+ $all_trackings
+ grid $w.validate.tracking_r $w.validate.tracking_m -sticky w
+ }
radiobutton $w.validate.always_r \
-text {Always (Do not perform merge checks)} \
-value always \
-font font_ui
text $ui_index -background white -borderwidth 0 \
-width 40 -height 10 \
+ -wrap none \
-font font_ui \
-cursor $cursor_ptr \
- -yscrollcommand {.vpane.files.index.sb set} \
+ -xscrollcommand {.vpane.files.index.sx set} \
+ -yscrollcommand {.vpane.files.index.sy set} \
-state disabled
-scrollbar .vpane.files.index.sb -command [list $ui_index yview]
+scrollbar .vpane.files.index.sx -orient h -command [list $ui_index xview]
+scrollbar .vpane.files.index.sy -orient v -command [list $ui_index yview]
pack .vpane.files.index.title -side top -fill x
-pack .vpane.files.index.sb -side right -fill y
+pack .vpane.files.index.sx -side bottom -fill x
+pack .vpane.files.index.sy -side right -fill y
pack $ui_index -side left -fill both -expand 1
.vpane.files add .vpane.files.index -sticky nsew
-font font_ui
text $ui_workdir -background white -borderwidth 0 \
-width 40 -height 10 \
+ -wrap none \
-font font_ui \
-cursor $cursor_ptr \
- -yscrollcommand {.vpane.files.workdir.sb set} \
+ -xscrollcommand {.vpane.files.workdir.sx set} \
+ -yscrollcommand {.vpane.files.workdir.sy set} \
-state disabled
-scrollbar .vpane.files.workdir.sb -command [list $ui_workdir yview]
+scrollbar .vpane.files.workdir.sx -orient h -command [list $ui_workdir xview]
+scrollbar .vpane.files.workdir.sy -orient v -command [list $ui_workdir yview]
pack .vpane.files.workdir.title -side top -fill x
-pack .vpane.files.workdir.sb -side right -fill y
+pack .vpane.files.workdir.sx -side bottom -fill x
+pack .vpane.files.workdir.sy -side right -fill y
pack $ui_workdir -side left -fill both -expand 1
.vpane.files add .vpane.files.workdir -sticky nsew
pack .vpane.lower.diff.header -side top -fill x
pack .vpane.lower.diff.body -side bottom -fill both -expand 1
-$ui_diff tag conf d_@ -font font_diffbold
-$ui_diff tag conf d_+ -foreground blue
+$ui_diff tag conf d_@ -foreground blue -font font_diffbold
+$ui_diff tag conf d_+ -foreground {#00a000}
$ui_diff tag conf d_- -foreground red
-$ui_diff tag conf d_++ -foreground blue
+$ui_diff tag conf d_++ -foreground {#00a000}
$ui_diff tag conf d_-- -foreground red
$ui_diff tag conf d_+s \
- -foreground blue \
- -background azure2
+ -foreground {#00a000} \
+ -background {#e2effa}
$ui_diff tag conf d_-s \
-foreground red \
- -background azure2
+ -background {#e2effa}
$ui_diff tag conf d_s+ \
- -foreground blue \
- -background {light goldenrod yellow}
+ -foreground {#00a000} \
+ -background ivory1
$ui_diff tag conf d_s- \
-foreground red \
- -background {light goldenrod yellow}
+ -background ivory1
$ui_diff tag conf d<<<<<<< \
-foreground orange \
-foreground orange \
-font font_diffbold
+$ui_diff tag raise sel
+
# -- Diff Body Context Menu
#
set ctxm .vpane.lower.diff.body.ctxm