hgk: remove regsub, split on \r instead
authorAndrew Shadura <bugzilla@tut.by>
Tue, 16 Oct 2012 22:44:14 +0200
changeset 18809 3131c9da8bf6
parent 18808 962844e8dd8e
child 18810 ac0336471ba7
hgk: remove regsub, split on \r instead No need to regsub all \r\n's to \n's, we can just split on \r as well; this may produce extra empty elements in the list, but they won't match anyway.
contrib/hgk
--- a/contrib/hgk	Tue Oct 16 22:41:44 2012 +0200
+++ b/contrib/hgk	Tue Oct 16 22:44:14 2012 +0200
@@ -472,9 +472,8 @@
             exit 2
         }
     }
-    regsub -all "\r\n" $heads "\n" heads
-
-    set lines [split $heads "\n"]
+
+    set lines [split $heads \r\n]
     foreach f $lines {
         set match ""
         regexp {changeset:\s+(\S+):(\S+)$} $f match id sha