Mercurial > hg
diff tests/test-add.t @ 37756:e7bf5a73e4e1
forget: add --confirm option
Also added confirmopts in cmdutil.py
Differential Revision: https://phab.mercurial-scm.org/D2934
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Thu, 22 Mar 2018 16:11:42 +0530 |
parents | 45bfcd16f27e |
children | f10cb49951e1 |
line wrap: on
line diff
--- a/tests/test-add.t Fri Apr 13 23:12:07 2018 -0400 +++ b/tests/test-add.t Thu Mar 22 16:11:42 2018 +0530 @@ -272,3 +272,58 @@ [1] $ cd .. + +test --confirm option in forget + + $ hg init forgetconfirm + $ cd forgetconfirm + $ echo foo > foo + $ hg commit -qAm "foo" + $ echo bar > bar + $ hg commit -qAm "bar" + $ hg forget foo --dry-run --confirm + abort: cannot specify both --dry-run and --confirm + [255] + + $ hg forget foo --config ui.interactive=True --confirm << EOF + > ? + > n + > EOF + forget foo [Ynsa?] ? + y - yes, forget this file + n - no, skip this file + s - skip remaining files + a - include all remaining files + ? - ? (display help) + forget foo [Ynsa?] n + + $ hg forget foo bar --config ui.interactive=True --confirm << EOF + > y + > n + > EOF + forget bar [Ynsa?] y + forget foo [Ynsa?] n + removing bar + $ hg status + R bar + $ hg up -qC . + + $ hg forget foo bar --config ui.interactive=True --confirm << EOF + > s + > EOF + forget bar [Ynsa?] s + $ hg st + $ hg up -qC . + + $ hg forget foo bar --config ui.interactive=True --confirm << EOF + > a + > EOF + forget bar [Ynsa?] a + removing bar + removing foo + $ hg status + R bar + R foo + $ hg up -qC . + + $ cd ..