evolve: improve inline documentation for the public divergence resolution
authorSushil khanchi <sushilkhanchi97@gmail.com>
Wed, 17 Apr 2019 12:31:17 +0530
changeset 4529 e0eaa33a1f8a
parent 4528 4c3667220267
child 4530 d081cc4f5fef
evolve: improve inline documentation for the public divergence resolution
hgext3rd/evolve/evolvecmd.py
--- 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)