##// END OF EJS Templates
graft: leverage cmdutil.check_incompatible_arguments() for --abort/--stop...
Martin von Zweigbergk -
r45553:6118ad07 default
parent child Browse files
Show More
@@ -2995,35 +2995,34 b' def _dograft(ui, repo, *revs, **opts):'
2995 graftstate = statemod.cmdstate(repo, b'graftstate')
2995 graftstate = statemod.cmdstate(repo, b'graftstate')
2996
2996
2997 if opts.get(b'stop'):
2997 if opts.get(b'stop'):
2998 if any(
2998 cmdutil.check_incompatible_arguments(
2999 (
2999 opts,
3000 opts.get(b'edit'),
3000 b'stop',
3001 opts.get(b'log'),
3001 [
3002 opts.get(b'user'),
3002 b'edit',
3003 opts.get(b'date'),
3003 b'log',
3004 opts.get(b'currentdate'),
3004 b'user',
3005 opts.get(b'currentuser'),
3005 b'date',
3006 opts.get(b'rev'),
3006 b'currentdate',
3007 )
3007 b'currentuser',
3008 ):
3008 b'rev',
3009 raise error.Abort(_(b"cannot specify any other flag with '--stop'"))
3009 ],
3010 )
3010 return _stopgraft(ui, repo, graftstate)
3011 return _stopgraft(ui, repo, graftstate)
3011 elif opts.get(b'abort'):
3012 elif opts.get(b'abort'):
3012 if any(
3013 cmdutil.check_incompatible_arguments(
3013 (
3014 opts,
3014 opts.get(b'edit'),
3015 b'abort',
3015 opts.get(b'log'),
3016 [
3016 opts.get(b'user'),
3017 b'edit',
3017 opts.get(b'date'),
3018 b'log',
3018 opts.get(b'currentdate'),
3019 b'user',
3019 opts.get(b'currentuser'),
3020 b'date',
3020 opts.get(b'rev'),
3021 b'currentdate',
3021 )
3022 b'currentuser',
3022 ):
3023 b'rev',
3023 raise error.Abort(
3024 ],
3024 _(b"cannot specify any other flag with '--abort'")
3025 )
3025 )
3026
3027 return cmdutil.abortgraft(ui, repo, graftstate)
3026 return cmdutil.abortgraft(ui, repo, graftstate)
3028 elif opts.get(b'continue'):
3027 elif opts.get(b'continue'):
3029 cont = True
3028 cont = True
@@ -253,13 +253,13 b' Testing the --stop flag of `hg graft` wh'
253 [255]
253 [255]
254
254
255 $ hg graft --stop -U
255 $ hg graft --stop -U
256 abort: cannot specify any other flag with '--stop'
256 abort: cannot specify both --stop and --user
257 [255]
257 [255]
258 $ hg graft --stop --rev 4
258 $ hg graft --stop --rev 4
259 abort: cannot specify any other flag with '--stop'
259 abort: cannot specify both --stop and --rev
260 [255]
260 [255]
261 $ hg graft --stop --log
261 $ hg graft --stop --log
262 abort: cannot specify any other flag with '--stop'
262 abort: cannot specify both --stop and --log
263 [255]
263 [255]
264
264
265 $ hg graft --stop
265 $ hg graft --stop
@@ -363,11 +363,11 b' when stripping is required'
363 [255]
363 [255]
364
364
365 $ hg graft --abort --currentuser
365 $ hg graft --abort --currentuser
366 abort: cannot specify any other flag with '--abort'
366 abort: cannot specify both --abort and --user
367 [255]
367 [255]
368
368
369 $ hg graft --abort --edit
369 $ hg graft --abort --edit
370 abort: cannot specify any other flag with '--abort'
370 abort: cannot specify both --abort and --edit
371 [255]
371 [255]
372
372
373 #if abortcommand
373 #if abortcommand
General Comments 0
You need to be logged in to leave comments. Login now