changeset 5551:22c82f714fe1

evolve: rename param `divergent` to `local` in a function Since it is a utility function to merge two content divergent changesets, it makes more sense to name the two changesets as "local" and "other".
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Thu, 06 Aug 2020 18:24:32 +0530
parents 95d00d58885f
children 4c328eb7196e
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Wed Aug 05 15:04:48 2020 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Thu Aug 06 18:24:32 2020 +0530
@@ -581,20 +581,19 @@
         bumped = repo[newnode]
         return _resolvephasedivergent(ui, repo, prec=prec, bumped=bumped)
 
-def _mergecontentdivergents(repo, progresscb, divergent, other, base,
+def _mergecontentdivergents(repo, progresscb, local, other, base,
                             evolvestate):
-    if divergent not in repo[None].parents():
+    if local not in repo[None].parents():
         repo.ui.note(_(b"updating to \"local\" side of the conflict: %s\n") %
-                     divergent.hex()[:12])
-        hg.updaterepo(repo, divergent.node(), False)
+                     local.hex()[:12])
+        hg.updaterepo(repo, local.node(), False)
     # merging the two content-divergent changesets
     repo.ui.note(_(b"merging \"other\" %s changeset '%s'\n") %
                  (TROUBLES['CONTENTDIVERGENT'], other.hex()[:12]))
     if progresscb:
         progresscb()
     with state.saver(evolvestate):
-        mergeancestor = repo.changelog.isancestor(divergent.node(),
-                                                  other.node())
+        mergeancestor = repo.changelog.isancestor(local.node(), other.node())
         stats = merge.update(repo,
                              other.node(),
                              branchmerge=True,