Mercurial > evolve
view tests/test-check-tag.t @ 6935:954d7ea5cd67 stable tip
stack: when stack base is obsolete, pick any successor, even if at random
There are situations when s0 is obsolete and we also cannot pick just one
successor for it to use in stack. In such a case, let's pick the "latest"
successor from the first set.
We're assuming that obsutil.successorssets() returns data in the same order (it
should, since it makes sure to sort data internally). Keeping that in mind,
while the successor picked for s0 by this code is not based on any sort of
sophisticated logic, it should nonetheless be the same every time.
This patch is probably not going to completely break anything that was
previously working fine, because the previous behavior was to just abort with
an exception.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 16 Nov 2024 17:01:02 +0400 |
parents | 28be6e0aa95d |
children |
line wrap: on
line source
#require test-repo Enable obsolescence to avoid the warning issue when obsmarkers are found $ . "$RUNTESTDIR/helpers-testrepo.sh" $ cd "$TESTDIR"/.. Checking all non-public tagged revisions up to the current commit, see our release checklist for more ideas $ for node in `testrepohg log --rev 'tag() and ::. and not public() and not desc("# no-check-commit")' --template '{node|short}\n'`; do > tags=`testrepohg log --rev $node --template '{tags}\n'` > if echo "$tags" | grep -q ' '; then > echo "Revision $node is tagged multiple times: $tags" > fi > branch=`testrepohg log --rev $node --template '{branch}\n'` > if [ "$branch" != "stable" ]; then > echo "Revision $node is not on stable branch: $branch" > fi > # Here we skip: > # - pullbundle because it usually has no changes (so no version bump) > if testrepohg grep --rev $node '^__version__ = .*\.dev' hgext3rd/evolve/ hgext3rd/topic/; then > echo "Versions should not end with .dev at tagged revision $node" > fi > entry=`testrepohg cat --rev $node CHANGELOG | grep -F "$tags"` > if [ -z "$entry" ]; then > echo "Revision $node has no CHANGELOG entry for $tags" > fi > if echo "$entry" | grep -E -vq ' -- [0-9]{4}-[0-9]{2}-[0-9]{2}'; then > echo "CHANGELOG entry for $tags should have a date in YYYY-MM-DD format: $entry" > fi > entry=`testrepohg cat --rev $node debian/changelog | grep -F "$tags"` > if [ -z "$entry" ]; then > echo "Revision $node has no debian/changelog entry for $tags" > fi > done