Mercurial > evolve
view tests/test-exchange-obsmarkers-case-A7.t @ 5619:5673730db8d5 stable
evolve: clean merge state when content divergence resolution has no changes
This patch backs out b723805d7fe1, which only hid the problem.
Usually mergestate is cleared (or should be cleared) when creating a new
changeset, but sometimes there are situations when there's nothing to commit.
When solving content divergence resulted in no changes and no new changesets
were created, mergestate was left untouched. That's a problem because sometimes
mergestate contains files with conflicts that were already resolved by user,
and such mergestate only applies to the current wdir parent. Since evolve has
already dealt with the current wdir parent successfully when it reached this
code, this is a good place to clean the mergestate.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 19 Sep 2020 17:49:31 +0200 |
parents | a8ff17479fb8 |
children | f3e39a354378 |
line wrap: on
line source
============================================ Testing obsolescence markers push: Cases A.7 ============================================ Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of all changesets that requested to be "in sync" after the push (even if they are already on both side). This test belongs to a series of tests checking such set is properly computed and applied. This does not tests "obsmarkers" discovery capabilities. Category A: simple cases TestCase 7: markers one non targeted common changeset A.7 non targeted common changeset ================================= .. {{{ .. ⇠◕ A .. | .. ● O .. }}} .. .. Markers exist from: .. .. * Chain from A .. .. Command run: .. .. * hg push -r O .. .. Expected exchange: .. .. * ø Setup ----- $ . $TESTDIR/testlib/exchange-obsmarker-util.sh Initial $ setuprepos A.7 creating test repo for test case A.7 - pulldest - main - pushdest cd into `main` and proceed with env setup $ cd main $ mkcommit A $ hg push -q ../pushdest $ hg push -q ../pulldest $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` 1 new obsolescence markers $ hg log -G --hidden @ f5bc6836db60 (draft): A | o a9bdc8b26820 (public): O $ inspect_obsmarkers obsstore content ================ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} obshashtree =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 obshashrange ============ rev node index size depth obshash 1 f5bc6836db60 0 2 2 50656e04a95e 0 a9bdc8b26820 0 1 1 000000000000 1 f5bc6836db60 1 1 2 50656e04a95e $ cd .. $ cd .. Actual Test ----------------------------------- $ dotest A.7 O ## Running testcase A.7 # testing echange of "O" (a9bdc8b26820) ## initial state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest # obstore: pulldest ## pushing "O" from main to pushdest pushing to pushdest searching for changes no changes found ## post push state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest # obstore: pulldest ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found ## post pull state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest # obstore: pulldest