[PATCH] hgk: display tags that contain spaces

TK Soh teekaysoh at gmail.com
Mon Jun 4 09:23:31 CDT 2007


the attached patch fixes a bug where tags containing space are not
displayed on hgk.
-------------- next part --------------
# HG changeset patch
# User TK Soh <teekaysoh at yahoo.com>
# Date 1180966613 18000
# Node ID 0671499f943bd9550223dcbfb2449e8e86235016
# Parent  22ebd6ee567226fa4d72b7ddeb56270c77c1d516
hgk: display tags that contain spaces

diff -r 22ebd6ee5672 -r 0671499f943b contrib/hgk
--- a/contrib/hgk	Mon Jun 04 00:26:53 2007 -0300
+++ b/contrib/hgk	Mon Jun 04 09:16:53 2007 -0500
@@ -264,9 +264,8 @@ proc readrefs {} {
     regsub -all "\r\n" $tags "\n" tags
     set lines [split $tags "\n"]
     foreach f $lines {
-	set f [regexp -all -inline {\S+} $f]
-	set direct [lindex $f 0]
-	set full [lindex $f 1]
+	regexp {(\S+)$} $f full
+	regsub {\s+(\S+)$} $f "" direct
 	set sha [split $full ':']
 	set tag [lindex $sha 1]
 	lappend tagids($direct) $tag


More information about the Mercurial-devel mailing list