Mercurial > evolve
changeset 3879:1fa3bf6e9e93
evolvecmd: introduce fn to be wrapped by extensions resolving content-div
The function added will be used by extension by wrapping it and adding logic to
merge data introduced by them. For example: topic extension can wrap this
function and add logic to merge topic names.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 08 Jul 2018 22:16:17 +0530 |
parents | dc2b53b3573f |
children | 9cf45b94f977 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Sun Jul 08 21:18:33 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Sun Jul 08 22:16:17 2018 +0530 @@ -549,6 +549,8 @@ # new node if any formed as the replacement newnode = None + mergehook(repo, base, divergent, other) + newnode = repo.commit(text=desc, user=repo.ui.username()) if newnode == divergent.node() or newnode is None: # no changes @@ -643,6 +645,11 @@ # this function only cmdrewrite._uncommitdirstate(repo, oldparent, match, True) +def mergehook(repo, base, divergent, other): + """function which extensions can wrap and merge data introduced by them + while resolving content-divergence""" + pass + def mergebranches(repo, divergent, other, base): """merges the branch information for content-divergent changesets and sets the dirstate branch accordingly