D2409: graft: add no-commit mode (issue5631)

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Jun 3 08:07:50 EDT 2018


pulkit requested changes to this revision.
pulkit added a comment.
This revision now requires changes to proceed.


  Please add tests where we are grafting multiple revisions using the --no-commit flag.

INLINE COMMENTS

> commands.py:2225
> +        if opts.get('edit'):
> +            raise error.Abort(_("can't specify --no-commit and --edit"))
> +        if opts.get('currentuser'):

the error messages should be `cannot specify --no-commit and --edit together`. This applies to rest two also.

> test-graft.t:1541
> +
> +  $ hg init nocommit
> +  $ cd nocommit

We are already in a repository here. `cd` back before creating a new repo.

> test-graft.t:1550
> +  $ hg ci -qAm2
> +
> +Check reporting when --no-commit used with non-applicable options:

add a `hg log` call here, it will be helpful in understanding what's happening.

> test-graft.t:1553
> +
> +  $ hg graft 1 --no-commit -e
> +  abort: can't specify --no-commit and --edit

maybe test with couple of other flags too.

> test-graft.t:1561
> +
> +  $ hg tip -T "rev: {rev}\n"
> +  rev: 2

replace this with `hg log`

> test-graft.t:1579
> +  $ echo B>a
> +  $ hg ci -qm5
> +  $ hg graft 4 --no-commit

add a `hg log` call after that

> test-graft.t:1599
> +  grafting 4:a08bb3910e7c "4"
> +  $ hg tip -T "rev: {rev}\n"
> +  rev: 5

replace this one also with `hg log`

> test-graft.t:1609
> +
> +Prepare wrdir to check --no-commit is resepected when passed with --continue:
> +

I am not sure we need this behavior. Let's have this test so that others can chime in if we don't want to have this behavior.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2409

To: khanchi97, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel


More information about the Mercurial-devel mailing list