Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 37778:f10cb49951e1
forget: rename --confirm to --interactive
Differential Revision: https://phab.mercurial-scm.org/D3405
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Wed, 18 Apr 2018 19:25:35 +0530 |
parents | d6970628b95f |
children | 32a75a8a5b0f |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Apr 17 13:46:18 2018 +0200 +++ b/mercurial/cmdutil.py Wed Apr 18 19:25:35 2018 +0530 @@ -2058,9 +2058,9 @@ for subpath in ctx.substate: ctx.sub(subpath).addwebdirpath(serverpath, webconf) -def forget(ui, repo, match, prefix, explicitonly, dryrun, confirm): - if dryrun and confirm: - raise error.Abort(_("cannot specify both --dry-run and --confirm")) +def forget(ui, repo, match, prefix, explicitonly, dryrun, interactive): + if dryrun and interactive: + raise error.Abort(_("cannot specify both --dry-run and --interactive")) join = lambda f: os.path.join(prefix, f) bad = [] badfn = lambda x, y: bad.append(x) or match.bad(x, y) @@ -2076,8 +2076,8 @@ sub = wctx.sub(subpath) try: submatch = matchmod.subdirmatcher(subpath, match) - subbad, subforgot = sub.forget(submatch, prefix, - dryrun=dryrun, confirm=confirm) + subbad, subforgot = sub.forget(submatch, prefix, dryrun=dryrun, + interactive=interactive) bad.extend([subpath + '/' + f for f in subbad]) forgot.extend([subpath + '/' + f for f in subforgot]) except error.LookupError: @@ -2100,7 +2100,7 @@ % match.rel(f)) bad.append(f) - if confirm: + if interactive: responses = _('[Ynsa?]' '$$ &Yes, forget this file' '$$ &No, skip this file' @@ -2127,7 +2127,7 @@ break for f in forget: - if ui.verbose or not match.exact(f) or confirm: + if ui.verbose or not match.exact(f) or interactive: ui.status(_('removing %s\n') % match.rel(f)) if not dryrun: