evolve: add logic to handle a particular case in divergence resolution
Case is: In content divergence, to check if the two csets are on different
parent or same parent what we do is find gca of the two csets and then
compare it with the singlesuccessors of two csets's parents.
Now, if gca is same as singlesuccessors of both the csets then we conclude
that both are on the same parent which is not totally correct as it is
possible that both the parents of two csets are obsolete with a single
successor.
This patch adds the logic to cover the above metioned case correctly,
deciding the part when we need to relocate a cset to other side while
resolving the stack of divergent csets.
Changes in test file demonstrate that before this patch we were not
doing it right because it should have relocated every node to other side
instead of just relocating the first one from the stack.
#require test-repo
$ checkcm() {
> if ! (which check-manifest > /dev/null); then
> echo skipped: missing tool: check-manifest;
> exit 80;
> fi;
> };
$ checkcm
$ cat << EOF >> $HGRCPATH
> [experimental]
> evolution=all
> EOF
Run check manifest:
$ cd $TESTDIR/..
$ check-manifest
lists of files in version control and sdist match