diff mercurial/patch.py @ 24837:edf907bd8144 stable

record: fix record with change on moved file crashes (issue4619) reverting 79fceed67676, add a test to prevent the issue from coming back.
author Laurent Charignon <lcharignon@fb.com>
date Wed, 22 Apr 2015 13:56:30 -0700
parents a7f8e3584ef3
children 8133494accf1
line wrap: on
line diff
--- a/mercurial/patch.py	Wed Apr 22 23:38:55 2015 +0900
+++ b/mercurial/patch.py	Wed Apr 22 13:56:30 2015 -0700
@@ -820,7 +820,7 @@
     """
     diffgit_re = re.compile('diff --git a/(.*) b/(.*)$')
     diff_re = re.compile('diff -r .* (.*)$')
-    allhunks_re = re.compile('(?:index|deleted file) ')
+    allhunks_re = re.compile('(?:index|new file|deleted file) ')
     pretty_re = re.compile('(?:new file|deleted file) ')
     special_re = re.compile('(?:index|new|deleted|copy|rename) ')