[PATCH] Fix issue 1763 by stripping \r from gitpatch reported path

Bill Barry after.fallout at gmail.com
Fri Jul 24 11:27:06 CDT 2009


# HG changeset patch
# User Bill Barry <after.fallout at gmail.com>
# Date 1248452792 21600
# Node ID 384618d1871a0923aa1715fcdd8d227a66e0455c
# Parent  65719472bfa2cde9630b2fc019688d95327d3e69
Fix issue 1763 by stripping \r from gitpatch reported path

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -1022,7 +1022,7 @@
             for gp in gitpatches:
                 if gp.op in ('COPY', 'RENAME'):
                     copyfile(gp.oldpath, gp.path, cwd)
-                changed[gp.path] = gp
+                changed[gp.path.rstrip('\r')] = gp
         else:
             raise util.Abort(_('unsupported parser state: %s') % state)
 


More information about the Mercurial-devel mailing list