Show More
@@ -741,7 +741,15 b' def applyupdates(repo, actions, wctx, mc' | |||
|
741 | 741 | |
|
742 | 742 | numupdates = sum(len(l) for m, l in actions.items() if m != 'k') |
|
743 | 743 | |
|
744 | def dirtysubstate(): | |
|
745 | # mark '.hgsubstate' as possibly dirty forcibly, because | |
|
746 | # modified '.hgsubstate' is misunderstood as clean, | |
|
747 | # when both st_size/st_mtime of '.hgsubstate' aren't changed, | |
|
748 | # even if "submerge" fails and '.hgsubstate' is inconsistent | |
|
749 | repo.dirstate.normallookup('.hgsubstate') | |
|
750 | ||
|
744 | 751 | if [a for a in actions['r'] if a[0] == '.hgsubstate']: |
|
752 | dirtysubstate() | |
|
745 | 753 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
746 | 754 | |
|
747 | 755 | # remove in parallel (must come first) |
@@ -760,6 +768,7 b' def applyupdates(repo, actions, wctx, mc' | |||
|
760 | 768 | updated = len(actions['g']) |
|
761 | 769 | |
|
762 | 770 | if [a for a in actions['g'] if a[0] == '.hgsubstate']: |
|
771 | dirtysubstate() | |
|
763 | 772 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
764 | 773 | |
|
765 | 774 | # forget (manifest only, just log it) (must come first) |
@@ -785,6 +794,7 b' def applyupdates(repo, actions, wctx, mc' | |||
|
785 | 794 | z += 1 |
|
786 | 795 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
787 | 796 | if f == '.hgsubstate': # subrepo states need updating |
|
797 | dirtysubstate() | |
|
788 | 798 | subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), |
|
789 | 799 | overwrite) |
|
790 | 800 | continue |
@@ -758,6 +758,8 b' test if untracked file is not overwritte' | |||
|
758 | 758 | |
|
759 | 759 | $ echo issue3276_ok > repo/s/b |
|
760 | 760 | $ hg -R repo2 push -f -q |
|
761 | $ touch -t 200001010000 repo/.hgsubstate | |
|
762 | $ hg -R repo status --config debug.dirstate.delaywrite=2 repo/.hgsubstate | |
|
761 | 763 | $ hg -R repo update |
|
762 | 764 | b: untracked file differs |
|
763 | 765 | abort: untracked files in working directory differ from files in requested revision (in subrepo s) |
@@ -766,6 +768,7 b' test if untracked file is not overwritte' | |||
|
766 | 768 | $ cat repo/s/b |
|
767 | 769 | issue3276_ok |
|
768 | 770 | $ rm repo/s/b |
|
771 | $ touch -t 200001010000 repo/.hgsubstate | |
|
769 | 772 | $ hg -R repo revert --all |
|
770 | 773 | reverting repo/.hgsubstate (glob) |
|
771 | 774 | reverting subrepo s |
General Comments 0
You need to be logged in to leave comments.
Login now