[PATCH V5] forget: add --dry-run mode

Yuya Nishihara yuya at tcha.org
Wed Mar 14 09:32:37 EDT 2018


On Wed, 14 Mar 2018 10:36:11 +0530, Sushil khanchi wrote:
> # HG changeset patch
> # User Sushil khanchi <sushilkhanchi97 at gmail.com>
> # Date 1520665399 -19800
> #      Sat Mar 10 12:33:19 2018 +0530
> # Node ID bd9d29c4c929d0495e874d0c35d96cae29f5ff72
> # Parent  4c71a26a4009d88590c9ae3d64a5912fd556d82e
> forget: add --dry-run mode

Queued this, thanks!

> -def forget(ui, repo, match, prefix, explicitonly):
> +def forget(ui, repo, match, prefix, explicitonly, dryrun):

Fixed largefiles/overrides.py in flight.

> - at command('^forget', walkopts, _('[OPTION]... FILE...'), inferrepo=True)
> + at command(
> +    '^forget',
> +    walkopts + dryrunopts,

You need to run test-completion.t. Updated in flight.

> --- a/tests/test-commit.t	Sun Mar 04 21:16:36 2018 -0500
> +++ b/tests/test-commit.t	Sat Mar 10 12:33:19 2018 +0530
> @@ -832,3 +832,18 @@
>  
>    $ cd ..
>  
> +test --dry-run mode in forget
> +
> +  $ hg init testdir_forget
> +  $ cd testdir_forget
> +  $ echo foo > foo
> +  $ hg add foo
> +  $ hg commit -m "foo"
> +  $ hg forget foo --dry-run -v
> +  removing foo
> +  $ hg diff
> +  $ hg forget not_exist -n
> +  not_exist: $ENOENT$
> +  [1]

Moved this to test-add.t.


More information about the Mercurial-devel mailing list