Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
16550:0d494a38c586 | 16551:ebf6d38c9063 |
---|---|
594 repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) | 594 repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) |
595 | 595 |
596 stats = applyupdates(repo, action, wc, p2, pa, overwrite) | 596 stats = applyupdates(repo, action, wc, p2, pa, overwrite) |
597 | 597 |
598 if not partial: | 598 if not partial: |
599 repo.dirstate.setparents(fp1, fp2) | 599 repo.setparents(fp1, fp2) |
600 recordupdates(repo, action, branchmerge) | 600 recordupdates(repo, action, branchmerge) |
601 if not branchmerge: | 601 if not branchmerge: |
602 repo.dirstate.setbranch(p2.branch()) | 602 repo.dirstate.setbranch(p2.branch()) |
603 finally: | 603 finally: |
604 wlock.release() | 604 wlock.release() |