Mercurial > evolve
changeset 5552:4c328eb7196e
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.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Fri, 07 Aug 2020 00:25:13 +0530 |
parents | 22c82f714fe1 |
children | 355a7c91ce9a |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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']: