# HG changeset patch # User Sushil khanchi # Date 1596740113 -19800 # Node ID 4c328eb7196e41abf7b10fcaf3997c786496fee4 # Parent 22c82f714fe1598a4459f52ce187d0da22ea6a88 evolve: add some assertions While working and debugging on divergence resolution handling, recently it took to me a good amount of time to find out what was actually wrong with the results, where the real problem was that "divergent" and "other" had the same value. diff -r 22c82f714fe1 -r 4c328eb7196e hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Thu Aug 06 18:24:32 2020 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Fri Aug 07 00:25:13 2020 +0530 @@ -583,6 +583,7 @@ def _mergecontentdivergents(repo, progresscb, local, other, base, evolvestate): + assert local != other if local not in repo[None].parents(): repo.ui.note(_(b"updating to \"local\" side of the conflict: %s\n") % local.hex()[:12]) @@ -1957,6 +1958,7 @@ repo = repo.unfiltered() divergent = repo[evolvestate[b'divergent']] other = repo[evolvestate[b'other-divergent']] + assert divergent != other base = repo[evolvestate[b'base']] resolutionparent = repo[evolvestate.get(b'resolutionparent')] if evolvestate[b'relocating-div']: