Mercurial > public > mercurial-scm > hg
diff mercurial/merge.py @ 21524:47b97d9af27e
merge: add labels parameter from merge.update to filemerge
Adds a labels function parameter to all the functions between merge.update and
filemerge.filemerge. This will allow commands like rebase to specify custom
marker labels.
author | Durham Goode <durham@fb.com> |
---|---|
date | Thu, 08 May 2014 16:54:23 -0700 |
parents | b1ce47dadbdf |
children | 43eecb4e23f8 |
line wrap: on
line diff
--- a/mercurial/merge.py Tue Apr 22 13:32:05 2014 -0700 +++ b/mercurial/merge.py Thu May 08 16:54:23 2014 -0700 @@ -264,7 +264,7 @@ if entry[0] == 'u': yield f - def resolve(self, dfile, wctx): + def resolve(self, dfile, wctx, labels=None): """rerun merge process for file path `dfile`""" if self[dfile] == 'r': return 0 @@ -287,7 +287,8 @@ f = self._repo.opener("merge/" + hash) self._repo.wwrite(dfile, f.read(), flags) f.close() - r = filemerge.filemerge(self._repo, self._local, lfile, fcd, fco, fca) + r = filemerge.filemerge(self._repo, self._local, lfile, fcd, fco, fca, + labels=labels) if r is None: # no real conflict del self._state[dfile] @@ -629,7 +630,7 @@ if i > 0: yield i, f -def applyupdates(repo, actions, wctx, mctx, overwrite): +def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None): """apply the merge action list to the working directory wctx is the working copy context @@ -734,7 +735,7 @@ overwrite) continue audit(f) - r = ms.resolve(f, wctx) + r = ms.resolve(f, wctx, labels=labels) if r is not None and r > 0: unresolved += 1 else: @@ -990,7 +991,7 @@ repo.dirstate.normal(f) def update(repo, node, branchmerge, force, partial, ancestor=None, - mergeancestor=False): + mergeancestor=False, labels=None): """ Perform a merge between the working directory and the given node @@ -1170,7 +1171,7 @@ # note that we're in the middle of an update repo.vfs.write('updatestate', p2.hex()) - stats = applyupdates(repo, actions, wc, p2, overwrite) + stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) if not partial: repo.setparents(fp1, fp2)