Show More
@@ -4437,14 +4437,17 b' loading it' | |||
|
4437 | 4437 | Test repo.anyrevs with customized revset overrides |
|
4438 | 4438 | |
|
4439 | 4439 | $ cat > $TESTTMP/printprevset.py <<EOF |
|
4440 | > from mercurial import encoding | |
|
4441 | > def reposetup(ui, repo): | |
|
4440 | > from mercurial import encoding, registrar | |
|
4441 | > cmdtable = {} | |
|
4442 | > command = registrar.command(cmdtable) | |
|
4443 | > @command('printprevset') | |
|
4444 | > def printprevset(ui, repo): | |
|
4442 | 4445 | > alias = {} |
|
4443 | 4446 | > p = encoding.environ.get('P') |
|
4444 | 4447 | > if p: |
|
4445 | 4448 | > alias['P'] = p |
|
4446 | 4449 | > revs = repo.anyrevs(['P'], user=True, localalias=alias) |
|
4447 | > ui.write('P=%r' % list(revs)) | |
|
4450 | > ui.write('P=%r\n' % list(revs)) | |
|
4448 | 4451 | > EOF |
|
4449 | 4452 | |
|
4450 | 4453 | $ cat >> .hg/hgrc <<EOF |
@@ -4452,9 +4455,9 b' Test repo.anyrevs with customized revset' | |||
|
4452 | 4455 | > printprevset = $TESTTMP/printprevset.py |
|
4453 | 4456 | > EOF |
|
4454 | 4457 | |
|
4455 |
$ hg --config revsetalias.P=1 |
|
|
4458 | $ hg --config revsetalias.P=1 printprevset | |
|
4456 | 4459 | P=[1] |
|
4457 |
$ P=3 hg --config revsetalias.P=2 |
|
|
4460 | $ P=3 hg --config revsetalias.P=2 printprevset | |
|
4458 | 4461 | P=[3] |
|
4459 | 4462 | |
|
4460 | 4463 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now