mercurial/patch.py
changeset 14347 e8debe1eb255
parent 14321 003d63bb4fa5
child 14348 c1c719103392
--- a/mercurial/patch.py	Mon May 16 16:59:45 2011 -0500
+++ b/mercurial/patch.py	Tue May 17 23:27:58 2011 +0200
@@ -1315,6 +1315,10 @@
                 for gp in values:
                     gp.path = pathstrip(gp.path, strip - 1)[1]
                     changed.add(gp.path)
+                    if gp.oldpath:
+                        gp.oldpath = pathstrip(gp.oldpath, strip - 1)[1]
+                        if gp.op == 'RENAME':
+                            changed.add(gp.oldpath)
             else:
                 raise util.Abort(_('unsupported parser state: %s') % state)
         return changed