# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1531068377 -19800 # Node ID 1fa3bf6e9e93cc244dea752196955a6d0c6b25b1 # Parent dc2b53b3573f4be70df99eb2dfea7398a52b5cc3 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. diff -r dc2b53b3573f -r 1fa3bf6e9e93 hgext3rd/evolve/evolvecmd.py --- 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