Show More
@@ -1226,13 +1226,9 b' def bookmark(ui, repo, *names, **opts):' | |||||
1226 | rev = opts.get(b'rev') |
|
1226 | rev = opts.get(b'rev') | |
1227 | inactive = opts.get(b'inactive') # meaning add/rename to inactive bookmark |
|
1227 | inactive = opts.get(b'inactive') # meaning add/rename to inactive bookmark | |
1228 |
|
1228 | |||
1229 | selactions = [k for k in [b'delete', b'rename', b'list'] if opts.get(k)] |
|
1229 | action = cmdutil.check_at_most_one_arg(opts, b'delete', b'rename', b'list') | |
1230 |
if |
|
1230 | if action: | |
1231 | raise error.Abort( |
|
1231 | pass | |
1232 | _(b'--%s and --%s are incompatible') % tuple(selactions[:2]) |
|
|||
1233 | ) |
|
|||
1234 | if selactions: |
|
|||
1235 | action = selactions[0] |
|
|||
1236 | elif names or rev: |
|
1232 | elif names or rev: | |
1237 | action = b'add' |
|
1233 | action = b'add' | |
1238 | elif inactive: |
|
1234 | elif inactive: |
@@ -475,7 +475,7 b' incompatible options' | |||||
475 | $ cd repo |
|
475 | $ cd repo | |
476 |
|
476 | |||
477 | $ hg bookmark -m Y -d Z |
|
477 | $ hg bookmark -m Y -d Z | |
478 |
abort: --delete and --rename |
|
478 | abort: cannot specify both --delete and --rename | |
479 | [255] |
|
479 | [255] | |
480 |
|
480 | |||
481 | $ hg bookmark -r 1 -d Z |
|
481 | $ hg bookmark -r 1 -d Z |
General Comments 0
You need to be logged in to leave comments.
Login now