##// END OF EJS Templates
diffstat: support filenames with whitespaces on renames...
Navaneeth Suresh -
r41446:4a33a6bf default
parent child Browse files
Show More
@@ -2806,9 +2806,9 def diffstatdata(lines):
2806 2806 line.startswith('Binary file')):
2807 2807 isbinary = True
2808 2808 elif line.startswith('rename from'):
2809 filename = line.split()[-1]
2809 filename = line[12:]
2810 2810 elif line.startswith('rename to'):
2811 filename += ' => %s' % line.split()[-1]
2811 filename += ' => %s' % line[10:]
2812 2812 addresult()
2813 2813 return results
2814 2814
@@ -255,3 +255,19 When a file is renamed, --git shouldn't
255 255 $ hg diff --stat --git
256 256 a => b | 0
257 257 1 files changed, 0 insertions(+), 0 deletions(-)
258 -- filename may contain whitespaces
259 $ echo > c
260 $ hg ci -Am 'add c'
261 adding c
262 $ hg mv c 'new c'
263 $ hg diff --git
264 diff --git a/c b/new c
265 rename from c
266 rename to new c
267 $ hg diff --stat
268 c | 1 -
269 new c | 1 +
270 2 files changed, 1 insertions(+), 1 deletions(-)
271 $ hg diff --stat --git
272 c => new c | 0
273 1 files changed, 0 insertions(+), 0 deletions(-)
General Comments 0
You need to be logged in to leave comments. Login now