Mercurial > evolve
annotate tests/test-check-tag.t @ 6831:4f02e7f8d56c stable
evolve: check that the evolved revisions are indeed in the repo during abort
Otherwise we might trigger an error while trying to access a revision that was
saved into evolvestate, but wasn't yet created in the repo for whatever reason.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 23 Aug 2024 17:00:28 +0400 |
parents | 279c01842eca |
children | 02f8c88f3d59 |
rev | line source |
---|---|
5653
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
1 #require test-repo |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
2 |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
3 Enable obsolescence to avoid the warning issue when obsmarkers are found |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
4 |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
5 $ cat << EOF >> $HGRCPATH |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
6 > [experimental] |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
7 > evolution = all |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
8 > EOF |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
9 |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
10 $ cd "$TESTDIR"/.. |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
11 |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
12 Checking all non-public tagged revisions up to the current commit, see our |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
13 release checklist for more ideas |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
14 |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
15 $ for node in `hg log --rev 'tag() and ::. and not public() and not desc("# no-check-commit")' --template '{node|short}\n'`; do |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
16 > tags=`hg log --rev $node --template '{tags}\n'` |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
17 > if echo "$tags" | grep -q ' '; then |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
18 > echo "Revision $node is tagged multiple times: $tags" |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
19 > fi |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
20 > branch=`hg log --rev $node --template '{branch}\n'` |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
21 > if [ "$branch" != "stable" ]; then |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
22 > echo "Revision $node is not on stable branch: $branch" |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
23 > fi |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
24 > # Here we skip: |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
25 > # - pullbundle because it usually has no changes (so no version bump) |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
26 > if hg grep --rev $node '^__version__ = .*\.dev' hgext3rd/evolve/ hgext3rd/topic/; then |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
27 > echo "Versions should not end with .dev at tagged revision $node" |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
28 > fi |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
29 > entry=`hg cat --rev $node CHANGELOG | fgrep "$tags"` |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
30 > if [ -z "$entry" ]; then |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
31 > echo "Revision $node has no CHANGELOG entry for $tags" |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
32 > fi |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
33 > if echo "$entry" | egrep -vq ' -- [0-9]{4}-[0-9]{2}-[0-9]{2}'; then |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
34 > echo "CHANGELOG entry for $tags should have a date in YYYY-MM-DD format: $entry" |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
35 > fi |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
36 > entry=`hg cat --rev $node debian/changelog | fgrep "$tags"` |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
37 > if [ -z "$entry" ]; then |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
38 > echo "Revision $node has no debian/changelog entry for $tags" |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
39 > fi |
479f76c47295
tests: add a new test-check-tag.t to test releases
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
40 > done |