contrib/hgk
changeset 18808 962844e8dd8e
parent 18806 932f5d3587c9
child 18809 3131c9da8bf6
--- a/contrib/hgk	Fri Mar 22 09:19:41 2013 -0700
+++ b/contrib/hgk	Tue Oct 16 22:41:44 2012 +0200
@@ -456,16 +456,13 @@
             exit 2
         }
     }
-    regsub -all "\r\n" $tags "\n" tags
-
-    set lines [split $tags "\n"]
-    foreach f $lines {
-	regexp {(\S+)$} $f full
-	regsub {\s+(\S+)$} $f "" direct
-	set sha [split $full ':']
-	set tag [lindex $sha 1]
-	lappend tagids($direct) $tag
-	lappend idtags($tag) $direct
+
+    foreach {tag rev} $tags {
+        # we use foreach as Tcl8.4 doesn't support lassign
+        foreach {- id} [split $rev :] {
+            lappend tagids($tag) $id
+            lappend idtags($id) $tag
+        }
     }
 
     set status [catch {exec $env(HG) --config ui.report_untrusted=false heads} heads]