[PATCH] hgk should parse dates in the diff output

Chris Mason mason at suse.com
Tue Jun 7 17:12:53 UTC 2005


hgk doesn't deal well with the difflib style diffs, it expects the filename 
to be the last thing on the line.  This patch fixes the regexp to stop 
reading the filename at the first tab.

Signed-off-by: Chris Mason <mason at suse.com>

--- a/contrib/hgk	Tue Jun  7 16:53:05 2005
+++ b/contrib/hgk	Tue Jun  7 13:08:42 2005
@@ -1181,7 +1181,6 @@
 	return
     }
     set file [lindex $line 5]
-    puts stderr "line $file\n"
     lappend treediffs($id) $file
 }
 
@@ -1221,7 +1220,7 @@
 	return
     }
     $ctext conf -state normal
-    if {[regexp {^---[ \t]+([^/])*/(.*)} $line match s1 fname]} {
+    if {[regexp {^---[ \t]+([^/])*/([^\t]*)} $line match s0 fname]} {
 	# start of a new file
 	$ctext insert end "\n"
 	$ctext tag add $curdifftag $curtagstart end



More information about the Mercurial mailing list