##// END OF EJS Templates
hgk - fix CR issues on windows
"Andrei Vermel " -
r3940:a33ddd20 default
parent child Browse files
Show More
@@ -43,7 +43,9 b' proc getcommits {rargs} {'
43 }
43 }
44 if [catch {
44 if [catch {
45 set parse_args [concat --default HEAD $revargs]
45 set parse_args [concat --default HEAD $revargs]
46 set parsed_args [split [eval exec hg debug-rev-parse $parse_args] "\n"]
46 set parse_temp [eval exec hg debug-rev-parse $parse_args]
47 regsub -all "\r\n" $parse_temp "\n" parse_temp
48 set parsed_args [split $parse_temp "\n"]
47 } err] {
49 } err] {
48 # if git-rev-parse failed for some reason...
50 # if git-rev-parse failed for some reason...
49 if {$rargs == {}} {
51 if {$rargs == {}} {
@@ -108,6 +110,7 b' to allow selection of commits to be disp'
108 set leftover {}
110 set leftover {}
109 }
111 }
110 set start [expr {$i + 1}]
112 set start [expr {$i + 1}]
113 regsub -all "\r\n" $cmit "\n" cmit
111 set j [string first "\n" $cmit]
114 set j [string first "\n" $cmit]
112 set ok 0
115 set ok 0
113 if {$j >= 0} {
116 if {$j >= 0} {
@@ -209,6 +212,7 b' proc parsecommit {id contents listed old'
209 incr ncleft($p)
212 incr ncleft($p)
210 }
213 }
211 }
214 }
215 regsub -all "\r\n" $contents "\n" contents
212 foreach line [split $contents "\n"] {
216 foreach line [split $contents "\n"] {
213 if {$inhdr} {
217 if {$inhdr} {
214 set line [split $line]
218 set line [split $line]
@@ -257,7 +261,8 b' proc readrefs {} {'
257 global tagids idtags headids idheads tagcontents
261 global tagids idtags headids idheads tagcontents
258
262
259 set tags [exec hg tags]
263 set tags [exec hg tags]
260 set lines [split $tags '\n']
264 regsub -all "\r\n" $tags "\n" tags
265 set lines [split $tags "\n"]
261 foreach f $lines {
266 foreach f $lines {
262 set f [regexp -all -inline {\S+} $f]
267 set f [regexp -all -inline {\S+} $f]
263 set direct [lindex $f 0]
268 set direct [lindex $f 0]
@@ -2856,6 +2861,7 b' proc getblobdiffline {bdf ids} {'
2856 if {$ids != $diffids || $bdf != $blobdifffd($ids)} {
2861 if {$ids != $diffids || $bdf != $blobdifffd($ids)} {
2857 return
2862 return
2858 }
2863 }
2864 regsub -all "\r" $line "" line
2859 $ctext conf -state normal
2865 $ctext conf -state normal
2860 if {[regexp {^diff --git a/(.*) b/(.*)} $line match fname newname]} {
2866 if {[regexp {^diff --git a/(.*) b/(.*)} $line match fname newname]} {
2861 # start of a new file
2867 # start of a new file
@@ -2914,7 +2920,7 b' proc getblobdiffline {bdf ids} {'
2914 } elseif {$diffinhdr || $x == "\\"} {
2920 } elseif {$diffinhdr || $x == "\\"} {
2915 # e.g. "\ No newline at end of file"
2921 # e.g. "\ No newline at end of file"
2916 $ctext insert end "$line\n" filesep
2922 $ctext insert end "$line\n" filesep
2917 } else {
2923 } elseif {$line != ""} {
2918 # Something else we don't recognize
2924 # Something else we don't recognize
2919 if {$curdifftag != "Comments"} {
2925 if {$curdifftag != "Comments"} {
2920 $ctext insert end "\n"
2926 $ctext insert end "\n"
General Comments 0
You need to be logged in to leave comments. Login now