# HG changeset patch # User Jun Wu # Date 2017-08-20 17:55:05 # Node ID 63773d7497b6a0245ef4156e0d12a6d751ec368b # Parent 252fb66ee5bbfab6dcd63f2fc1b75aa9eb33fd4d test-revset: make it work with chg chg currently triggers `reposetup` as a side effect of `hg serve` command. Therefore change the test to not output during `reposetup` to be compatible with chg. Differential Revision: https://phab.mercurial-scm.org/D455 diff --git a/tests/test-revset.t b/tests/test-revset.t --- a/tests/test-revset.t +++ b/tests/test-revset.t @@ -4437,14 +4437,17 @@ loading it Test repo.anyrevs with customized revset overrides $ cat > $TESTTMP/printprevset.py < 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 < 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 ..