Parametrize discard command
This commit is contained in:
parent
79e57e4c07
commit
32cbbaeed8
@ -103,10 +103,17 @@ def revert(uid):
|
|||||||
raise click.BadParameter(str(er))
|
raise click.BadParameter(str(er))
|
||||||
|
|
||||||
@changes.command()
|
@changes.command()
|
||||||
def discard():
|
@click.argument('uids', nargs=-1)
|
||||||
|
@click.option('--all', is_flag=True, default=True)
|
||||||
|
def discard(uids, all):
|
||||||
|
"""
|
||||||
|
uids argument should be of a higher priority than all flag
|
||||||
|
"""
|
||||||
|
if uids:
|
||||||
|
change.discard_uids(uids)
|
||||||
|
elif all:
|
||||||
change.discard_all()
|
change.discard_all()
|
||||||
|
|
||||||
|
|
||||||
@changes.command()
|
@changes.command()
|
||||||
@click.option('--name', default=None)
|
@click.option('--name', default=None)
|
||||||
def test(name):
|
def test(name):
|
||||||
|
Loading…
Reference in New Issue
Block a user