D2934: forget: add --confirm option

khanchi97 (Sushil khanchi) phabricator at mercurial-scm.org
Sun Apr 1 05:25:02 UTC 2018


khanchi97 added a comment.


  I have made the requested changes. Now --confirm will prompt per file and also added all/skip option which will either include all the remaining files or skip all the remaining files according the user input.

INLINE COMMENTS

> av6 wrote in cmdutil.py:2007
> "cannot specify both --dry-run and --confirm" is the style used in other commands.

sorry, am I supposed to make any change here?

> pulkit wrote in cmdutil.py:2047
> I think the right behavior should be to ask for each file and forget the ones which user confirmed to forget.

cool :)

> av6 wrote in commands.py:2043
> Looks like test-completion.t also needs to be updated.

yeah, I will update this.

> test-add.t:302
> +  removing foo
> +  are you sure you want to forget (yn)? y
> +  $ cd ..

I need some help here. Why it's not passing `n` as a response? I passed `n` in line 299 but as a response from user why it is taking `y` everytime?

> pulkit wrote in test-add.t:302
> Looks like it's not reading the input. Look whether ui.interactive is set or not.

I have set ui.interactive=True but, the problem is still same. And also by default ui.interactive is always True.

> test-add.t:296
> +  > EOF
> +  forget foo (yn)? y
> +  removing foo

I have set ui.interactive=True but it still not read input.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list