1022 action = cmdutil.check_at_most_one_arg(opts, b'abort', b'stop', b'continue') |
1022 action = cmdutil.check_at_most_one_arg(opts, b'abort', b'stop', b'continue') |
1023 if action: |
1023 if action: |
1024 cmdutil.check_incompatible_arguments( |
1024 cmdutil.check_incompatible_arguments( |
1025 opts, action, b'confirm', b'dry_run' |
1025 opts, action, b'confirm', b'dry_run' |
1026 ) |
1026 ) |
|
1027 cmdutil.check_incompatible_arguments( |
|
1028 opts, action, b'rev', b'source', b'base', b'dest' |
|
1029 ) |
1027 cmdutil.check_at_most_one_arg(opts, b'confirm', b'dry_run') |
1030 cmdutil.check_at_most_one_arg(opts, b'confirm', b'dry_run') |
1028 cmdutil.check_at_most_one_arg(opts, b'rev', b'source', b'base') |
1031 cmdutil.check_at_most_one_arg(opts, b'rev', b'source', b'base') |
1029 |
1032 |
1030 if action or repo.currenttransaction() is not None: |
1033 if action or repo.currenttransaction() is not None: |
1031 # in-memory rebase is not compatible with resuming rebases. |
1034 # in-memory rebase is not compatible with resuming rebases. |
1189 |
1192 |
1190 if action: |
1193 if action: |
1191 if rbsrt.collapsef: |
1194 if rbsrt.collapsef: |
1192 raise error.Abort( |
1195 raise error.Abort( |
1193 _(b'cannot use collapse with continue or abort') |
1196 _(b'cannot use collapse with continue or abort') |
1194 ) |
|
1195 if srcf or basef or destf: |
|
1196 raise error.Abort( |
|
1197 _(b'abort and continue do not allow specifying revisions') |
|
1198 ) |
1197 ) |
1199 if action == b'abort' and opts.get(b'tool', False): |
1198 if action == b'abort' and opts.get(b'tool', False): |
1200 ui.warn(_(b'tool option will be ignored\n')) |
1199 ui.warn(_(b'tool option will be ignored\n')) |
1201 if action == b'continue': |
1200 if action == b'continue': |
1202 ms = mergemod.mergestate.read(repo) |
1201 ms = mergemod.mergestate.read(repo) |