##// END OF EJS Templates
graft: leverage cmdutil.check_incompatible_arguments() for --no-commit...
Martin von Zweigbergk -
r45549:c63a297f default
parent child Browse files
Show More
@@ -2986,21 +2986,10 b' def _dograft(ui, repo, *revs, **opts):'
2986
2986
2987 cont = False
2987 cont = False
2988 if opts.get(b'no_commit'):
2988 if opts.get(b'no_commit'):
2989 if opts.get(b'edit'):
2989 cmdutil.check_incompatible_arguments(
2990 raise error.Abort(
2990 opts,
2991 _(b"cannot specify --no-commit and --edit together")
2991 b'no_commit',
2992 )
2992 [b'edit', b'currentuser', b'currentdate', b'log'],
2993 if opts.get(b'currentuser'):
2994 raise error.Abort(
2995 _(b"cannot specify --no-commit and --currentuser together")
2996 )
2997 if opts.get(b'currentdate'):
2998 raise error.Abort(
2999 _(b"cannot specify --no-commit and --currentdate together")
3000 )
3001 if opts.get(b'log'):
3002 raise error.Abort(
3003 _(b"cannot specify --no-commit and --log together")
3004 )
2993 )
3005
2994
3006 graftstate = statemod.cmdstate(repo, b'graftstate')
2995 graftstate = statemod.cmdstate(repo, b'graftstate')
@@ -553,15 +553,15 b' Testing --no-commit option:|'
553 Check reporting when --no-commit used with non-applicable options:
553 Check reporting when --no-commit used with non-applicable options:
554
554
555 $ hg graft 1 --no-commit -e
555 $ hg graft 1 --no-commit -e
556 abort: cannot specify --no-commit and --edit together
556 abort: cannot specify both --no-commit and --edit
557 [255]
557 [255]
558
558
559 $ hg graft 1 --no-commit --log
559 $ hg graft 1 --no-commit --log
560 abort: cannot specify --no-commit and --log together
560 abort: cannot specify both --no-commit and --log
561 [255]
561 [255]
562
562
563 $ hg graft 1 --no-commit -D
563 $ hg graft 1 --no-commit -D
564 abort: cannot specify --no-commit and --currentdate together
564 abort: cannot specify both --no-commit and --currentdate
565 [255]
565 [255]
566
566
567 Test --no-commit is working:
567 Test --no-commit is working:
General Comments 0
You need to be logged in to leave comments. Login now