changeset 6836:0a1ed671eb7a

tests: use testrepohg in test-check-tag.t testrepohg is required if you want it to read ~/.hgrc. Important if the CI user is not root, but needs to trust root hgrc files.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 02 Aug 2024 16:36:40 +0400
parents 89349d870f6b
children dee7d1e2b559
files tests/test-check-tag.t
diffstat 1 files changed, 7 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-tag.t	Fri Aug 02 16:29:10 2024 +0400
+++ b/tests/test-check-tag.t	Fri Aug 02 16:36:40 2024 +0400
@@ -2,38 +2,35 @@
 
 Enable obsolescence to avoid the warning issue when obsmarkers are found
 
-  $ cat << EOF >> $HGRCPATH
-  > [experimental]
-  > evolution = all
-  > EOF
+  $ . "$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 `hg log --rev 'tag() and ::. and not public() and not desc("# no-check-commit")' --template '{node|short}\n'`; do
-  >   tags=`hg log --rev $node --template '{tags}\n'`
+  $ 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=`hg log --rev $node --template '{branch}\n'`
+  >   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 hg grep --rev $node '^__version__ = .*\.dev' hgext3rd/evolve/ hgext3rd/topic/; then
+  >   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=`hg cat --rev $node CHANGELOG | grep -F "$tags"`
+  >   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=`hg cat --rev $node debian/changelog | grep -F "$tags"`
+  >   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