Mercurial > hg > mercurial-crew-with-dirclash
diff contrib/hgk @ 3056:3dab573a4330
hgk: use short changeset hashes
this fixes the missing tags on hgk window
author | TK Soh <teekaysoh@yahoo.com> |
---|---|
date | Thu, 24 Aug 2006 16:12:23 -0500 |
parents | 936b615eb44e |
children | d0fcce3728d1 |
line wrap: on
line diff
--- a/contrib/hgk +++ b/contrib/hgk @@ -100,7 +100,7 @@ to allow selection of commits to be disp set ids [string range $cmit 0 [expr {$j - 1}]] set ok 1 foreach id $ids { - if {![regexp {^[0-9a-f]{40}$} $id]} { + if {![regexp {^[0-9a-f]{12}$} $id]} { set ok 0 break } @@ -261,7 +261,7 @@ proc readotherrefs {base dname excl} { catch { set fd [open $f r] set line [read $fd 40] - if {[regexp {^[0-9a-f]{40}} $line id]} { + if {[regexp {^[0-9a-f]{12}} $line id]} { set name "$dname[file tail $f]" set otherrefids($name) $id lappend idotherrefs($id) $name @@ -1743,7 +1743,7 @@ proc readfindproc {} { } return } - if {![regexp {^[0-9a-f]{40}} $line id]} { + if {![regexp {^[0-9a-f]{12}} $line id]} { error_popup "Can't parse git-diff-tree output: $line" stopfindproc return @@ -1856,7 +1856,7 @@ proc readfilediffs {df} { } return } - if {[regexp {^([0-9a-f]{40}) \(from ([0-9a-f]{40})\)} $line match id p]} { + if {[regexp {^([0-9a-f]{12}) \(from ([0-9a-f]{12})\)} $line match id p]} { # start of a new string of diffs donefilediff set fdiffids [list $id $p] @@ -2014,7 +2014,7 @@ proc appendwithlinks {text} { set start [$ctext index "end - 1c"] $ctext insert end $text $ctext insert end "\n" - set links [regexp -indices -all -inline {[0-9a-f]{40}} $text] + set links [regexp -indices -all -inline {[0-9a-f]{12}} $text] foreach l $links { set s [lindex $l 0] set e [lindex $l 1]