Mercurial > hg
view tests/test-issue1993.t @ 36353:cc9d0763c8e9
fancyopts: add support for custom multi-arg opts in fancyopts.py
This allows for more complex multi-arg opt logic, such as "--sum 1 --sum 2"
-> 3, "--csv alice,bob --csv charlie" -> ["alice","bob","charlie"]. The
current support for callables is insufficient for this.
This is done by introducing a 'customopt' class which can be extended for
more powerful opts logic. All existing opt-types are converted to use this
class, simplifying the fancyopts() logic.
Differential Revision: https://phab.mercurial-scm.org/D2090
author | Daniel Ploch <dploch@google.com> |
---|---|
date | Wed, 21 Feb 2018 20:05:29 -0800 |
parents | 4591cd6b6794 |
children |
line wrap: on
line source
$ hg init a $ cd a $ echo a > a $ hg ci -Am0 adding a $ echo b > b $ hg ci -Am1 adding b $ hg tag -r0 default warning: tag default conflicts with existing branch name $ hg log changeset: 2:30a83d1e4a1e tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Added tag default for changeset f7b1eb17ad24 changeset: 1:925d80f479bb user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 1 changeset: 0:f7b1eb17ad24 tag: default user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 0 $ hg update 'tag(default)' 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg parents changeset: 0:f7b1eb17ad24 tag: default user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 0 $ hg update 'branch(default)' 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg parents changeset: 2:30a83d1e4a1e tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Added tag default for changeset f7b1eb17ad24 $ cd ..