Patchwork D455: test-revset: make it work with chg

login
register
mail settings
Submitter phabricator
Date Aug. 23, 2017, 1:58 p.m.
Message ID <3f1016faa1fc4ef9a916e59e7f529b58@localhost.localdomain>
Download mbox | patch
Permalink /patch/23226/
State Not Applicable
Headers show

Comments

phabricator - Aug. 23, 2017, 1:58 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG63773d7497b6: test-revset: make it work with chg (authored by quark).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D455?vs=1107&id=1195

REVISION DETAIL
  https://phab.mercurial-scm.org/D455

AFFECTED FILES
  tests/test-revset.t

CHANGE DETAILS




To: quark, #hg-reviewers, yuja
Cc: yuja, mercurial-devel

Patch

diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -4437,24 +4437,27 @@ 
 Test repo.anyrevs with customized revset overrides
 
   $ cat > $TESTTMP/printprevset.py <<EOF
-  > from mercurial import encoding
-  > def reposetup(ui, repo):
+  > from mercurial import encoding, registrar
+  > cmdtable = {}
+  > command = registrar.command(cmdtable)
+  > @command('printprevset')
+  > def printprevset(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))
+  >     ui.write('P=%r\n' % list(revs))
   > EOF
 
   $ cat >> .hg/hgrc <<EOF
   > custompredicate = !
   > printprevset = $TESTTMP/printprevset.py
   > EOF
 
-  $ hg --config revsetalias.P=1 log -r . -T '\n'
+  $ hg --config revsetalias.P=1 printprevset
   P=[1]
-  $ P=3 hg --config revsetalias.P=2 log -r . -T '\n'
+  $ P=3 hg --config revsetalias.P=2 printprevset
   P=[3]
 
   $ cd ..