changeset 6566:30d3d531e11a

rename --after: do not unlink source file (issue910) "rename --after a.txt A.txt" on case mangling systems (e.g. Windows) erroneously deleted A.txt (even if modified).
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 19 Apr 2008 10:42:30 +0200
parents c242fc76958e
children 24dbf3a32b18 088ba40585b9
files mercurial/cmdutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Apr 18 17:25:10 2008 +0200
+++ b/mercurial/cmdutil.py	Sat Apr 19 10:42:30 2008 +0200
@@ -395,7 +395,7 @@
                 repo.copy(origsrc, abstarget)
 
         if rename and not dryrun:
-            repo.remove([abssrc], True)
+            repo.remove([abssrc], not after)
 
     # pat: ossep
     # dest ossep