diff mercurial/merge.py @ 16551:ebf6d38c9063 stable

localrepo: add setparents() to adjust dirstate copies (issue3407) The fix introduced in eab9119c5dee was only partially successful. It is correct to turn dirstate 'm' merge records into normal/dirty ones but copy records are lost in the process. To adjust them as well, we need to look in the first parent manifest to know which files were added and preserve only related records. But the dirstate does not have access to changesets, the logic has to moved at another level, in localrepo.
author Patrick Mezard <patrick@mezard.eu>
date Sun, 29 Apr 2012 22:25:55 +0200
parents 11212babc690
children 525fdb738975
line wrap: on
line diff
--- a/mercurial/merge.py	Sun Apr 29 16:18:46 2012 +0200
+++ b/mercurial/merge.py	Sun Apr 29 22:25:55 2012 +0200
@@ -596,7 +596,7 @@
         stats = applyupdates(repo, action, wc, p2, pa, overwrite)
 
         if not partial:
-            repo.dirstate.setparents(fp1, fp2)
+            repo.setparents(fp1, fp2)
             recordupdates(repo, action, branchmerge)
             if not branchmerge:
                 repo.dirstate.setbranch(p2.branch())