diff mercurial/cmdutil.py @ 24866:e1ec3d075c67 stable

record: fix adding new file with record from within a subdir (issue4626) In my latest change on record (edit newly added file), I forgot the repo.wjoin() so that record was not computing the paths properly to delete the backups and was crashing.
author Laurent Charignon <lcharignon@fb.com>
date Mon, 27 Apr 2015 14:02:49 -0700
parents bff42a92012e
children a02d293a1079
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Apr 27 16:24:43 2015 -0500
+++ b/mercurial/cmdutil.py	Mon Apr 27 14:02:49 2015 -0700
@@ -161,7 +161,7 @@
             dopatch = fp.tell()
             fp.seek(0)
 
-            [os.unlink(c) for c in newlyaddedandmodifiedfiles]
+            [os.unlink(repo.wjoin(c)) for c in newlyaddedandmodifiedfiles]
             # 3a. apply filtered patch to clean repo  (clean)
             if backups:
                 # Equivalent to hg.revert