##// END OF EJS Templates
merge: replace calls to hg.updaterepo() by merge.update()...
Martin von Zweigbergk -
r46151:5c8230ca default
parent child Browse files
Show More
@@ -881,8 +881,7 b' class fold(histeditaction):'
881 881 return False
882 882
883 883 def finishfold(self, ui, repo, ctx, oldctx, newnode, internalchanges):
884 parent = ctx.p1().node()
885 hg.updaterepo(repo, parent, overwrite=False)
884 mergemod.update(ctx.p1())
886 885 ### prepare new commit data
887 886 commitopts = {}
888 887 commitopts[b'user'] = ctx.user()
@@ -926,7 +925,7 b' class fold(histeditaction):'
926 925 )
927 926 if n is None:
928 927 return ctx, []
929 hg.updaterepo(repo, n, overwrite=False)
928 mergemod.update(repo[n])
930 929 replacements = [
931 930 (oldctx.node(), (newnode,)),
932 931 (ctx.node(), (n,)),
@@ -2050,7 +2049,7 b' def _continuehistedit(ui, repo, state):'
2050 2049
2051 2050 def _finishhistedit(ui, repo, state, fm):
2052 2051 """This action runs when histedit is finishing its session"""
2053 hg.updaterepo(repo, state.parentctxnode, overwrite=False)
2052 mergemod.update(repo[state.parentctxnode])
2054 2053
2055 2054 mapping, tmpnodes, created, ntm = processreplacement(state)
2056 2055 if mapping:
@@ -34,7 +34,6 b' from mercurial import ('
34 34 dirstateguard,
35 35 error,
36 36 extensions,
37 hg,
38 37 merge as mergemod,
39 38 mergestate as mergestatemod,
40 39 mergeutil,
@@ -750,7 +749,7 b' class rebaseruntime(object):'
750 749 newwd = self.originalwd
751 750 if newwd not in [c.rev() for c in repo[None].parents()]:
752 751 ui.note(_(b"update back to initial working directory parent\n"))
753 hg.updaterepo(repo, newwd, overwrite=False)
752 mergemod.update(repo[newwd])
754 753
755 754 collapsedas = None
756 755 if self.collapsef and not self.keepf:
@@ -80,9 +80,9 b' from mercurial import ('
80 80 dirstate,
81 81 error,
82 82 extensions,
83 hg,
84 83 logcmdutil,
85 84 match as matchmod,
85 merge as mergemod,
86 86 pycompat,
87 87 registrar,
88 88 sparse,
@@ -173,9 +173,9 b' def _clonesparsecmd(orig, ui, repo, *arg'
173 173 # clone
174 174 if not narrow_pat and (include or exclude or enableprofile):
175 175
176 def clonesparse(orig, self, node, overwrite, *args, **kwargs):
176 def clonesparse(orig, ctx, *args, **kwargs):
177 177 sparse.updateconfig(
178 self.unfiltered(),
178 ctx.repo().unfiltered(),
179 179 pat,
180 180 {},
181 181 include=include,
@@ -183,9 +183,9 b' def _clonesparsecmd(orig, ui, repo, *arg'
183 183 enableprofile=enableprofile,
184 184 usereporootpaths=True,
185 185 )
186 return orig(self, node, overwrite, *args, **kwargs)
186 return orig(ctx, *args, **kwargs)
187 187
188 extensions.wrapfunction(hg, b'updaterepo', clonesparse)
188 extensions.wrapfunction(mergemod, b'update', clonesparse)
189 189 return orig(ui, repo, *args, **opts)
190 190
191 191
@@ -1061,7 +1061,7 b' def updaterepo(repo, node, overwrite, up'
1061 1061
1062 1062 def update(repo, node, quietempty=False, updatecheck=None):
1063 1063 """update the working directory to node"""
1064 stats = updaterepo(repo, node, False, updatecheck=updatecheck)
1064 stats = mergemod.update(repo[node], updatecheck=updatecheck)
1065 1065 _showstats(repo, stats, quietempty)
1066 1066 if stats.unresolvedcount:
1067 1067 repo.ui.status(_(b"use 'hg resolve' to retry unresolved file merges\n"))
@@ -839,7 +839,7 b' def unshelvecontinue(ui, repo, state, op'
839 839 state.nodestoremove.append(newnode)
840 840 shelvectx = repo[newnode]
841 841
842 hg.updaterepo(repo, pendingctx.node(), overwrite=False)
842 merge.update(pendingctx)
843 843 mergefiles(ui, repo, state.wctx, shelvectx)
844 844 restorebranch(ui, repo, state.branchtorestore)
845 845
@@ -1031,7 +1031,7 b' def _rebaserestoredcommit('
1031 1031 ui.status(msg)
1032 1032 else:
1033 1033 shelvectx = repo[newnode]
1034 hg.updaterepo(repo, tmpwctx.node(), False)
1034 merge.update(tmpwctx)
1035 1035
1036 1036 return shelvectx, ispartialunshelve
1037 1037
@@ -787,7 +787,7 b' class hgsubrepo(abstractsubrepo):'
787 787 if overwrite:
788 788 merge.clean_update(repo[revision])
789 789 else:
790 hg.updaterepo(repo, revision, False)
790 merge.update(repo[revision])
791 791
792 792 @annotatesubrepoerror
793 793 def merge(self, state):
General Comments 0
You need to be logged in to leave comments. Login now