##// END OF EJS Templates
merge: remove useless dirstate.normallookup() invocation in applyupdates()...
FUJIWARA Katsunori -
r25754:19cc443a default
parent child Browse files
Show More
@@ -741,15 +741,7 b' def applyupdates(repo, actions, wctx, mc'
741
741
742 numupdates = sum(len(l) for m, l in actions.items() if m != 'k')
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
751 if [a for a in actions['r'] if a[0] == '.hgsubstate']:
744 if [a for a in actions['r'] if a[0] == '.hgsubstate']:
752 dirtysubstate()
753 subrepo.submerge(repo, wctx, mctx, wctx, overwrite)
745 subrepo.submerge(repo, wctx, mctx, wctx, overwrite)
754
746
755 # remove in parallel (must come first)
747 # remove in parallel (must come first)
@@ -768,7 +760,6 b' def applyupdates(repo, actions, wctx, mc'
768 updated = len(actions['g'])
760 updated = len(actions['g'])
769
761
770 if [a for a in actions['g'] if a[0] == '.hgsubstate']:
762 if [a for a in actions['g'] if a[0] == '.hgsubstate']:
771 dirtysubstate()
772 subrepo.submerge(repo, wctx, mctx, wctx, overwrite)
763 subrepo.submerge(repo, wctx, mctx, wctx, overwrite)
773
764
774 # forget (manifest only, just log it) (must come first)
765 # forget (manifest only, just log it) (must come first)
@@ -794,7 +785,6 b' def applyupdates(repo, actions, wctx, mc'
794 z += 1
785 z += 1
795 progress(_updating, z, item=f, total=numupdates, unit=_files)
786 progress(_updating, z, item=f, total=numupdates, unit=_files)
796 if f == '.hgsubstate': # subrepo states need updating
787 if f == '.hgsubstate': # subrepo states need updating
797 dirtysubstate()
798 subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx),
788 subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx),
799 overwrite)
789 overwrite)
800 continue
790 continue
General Comments 0
You need to be logged in to leave comments. Login now