rename --after: do not unlink source file (issue910)
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Sat, 19 Apr 2008 10:42:30 +0200
changeset 6566 30d3d531e11a
parent 6561 c242fc76958e
child 6567 24dbf3a32b18
child 6606 088ba40585b9
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).
mercurial/cmdutil.py
--- 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