tests/test-revset.t
changeset 33336 4672db164c98
parent 33286 2428e8ec0793
child 33377 5d63e5f40bea
--- a/tests/test-revset.t	Fri Jul 07 01:05:20 2017 -0400
+++ b/tests/test-revset.t	Sat Jun 24 15:29:42 2017 -0700
@@ -4259,4 +4259,27 @@
   hg: parse error: unknown identifier: custom1
   [255]
 
+Test repo.anyrevs with customized revset overrides
+
+  $ cat > $TESTTMP/printprevset.py <<EOF
+  > from mercurial import encoding
+  > def reposetup(ui, repo):
+  >     alias = {}
+  >     p = encoding.environ.get('P')
+  >     if p:
+  >         alias['P'] = p
+  >     revs = repo.anyrevs(['P'], user=True, localalias=alias)
+  >     ui.write('P=%r' % list(revs))
+  > EOF
+
+  $ cat >> .hg/hgrc <<EOF
+  > custompredicate = !
+  > printprevset = $TESTTMP/printprevset.py
+  > EOF
+
+  $ hg --config revsetalias.P=1 log -r . -T '\n'
+  P=[1]
+  $ P=3 hg --config revsetalias.P=2 log -r . -T '\n'
+  P=[3]
+
   $ cd ..