changeset 18809:3131c9da8bf6

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.
author Andrew Shadura <bugzilla@tut.by>
date Tue, 16 Oct 2012 22:44:14 +0200
parents 962844e8dd8e
children ac0336471ba7
files contrib/hgk
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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