changeset 4529:e0eaa33a1f8a

evolve: improve inline documentation for the public divergence resolution
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Wed, 17 Apr 2019 12:31:17 +0530
parents 4c3667220267
children d081cc4f5fef
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Sun Apr 14 20:26:05 2019 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Wed Apr 17 12:31:17 2019 +0530
@@ -533,16 +533,19 @@
     if not haspubdiv:
         return (res, newnode)
     else:
-        # when we have content-divergence with a public cset: after completing
-        # content divergence resolution the resulting node will be phase
-        # divergent with that same public cset.
-        # here newnode is phase divergent, lets resolve this divergence.
+        # we have content-divergence with a public cset:
+        # after performing content divergence resolution steps, possbile cases:
+        # 1) merging results in a new node:
+        #       we need to perform phase divergence resolution
+        # 2) merging leads to same content as public cset:
+        #       divergence has been resolved by creating markers
         if not res:
             # resolution was not successful, return
             return (res, newnode)
         if newnode == publicdiv.node():
-            # no changes were found that are different from public cset
+            # case 2)
             return (res, newnode)
+        # case 1)
         prec = publicdiv
         bumped = repo[newnode]
         return _resolvephasedivergent(ui, repo, prec=prec, bumped=bumped)