mercurial/commands.py
changeset 37778 f10cb49951e1
parent 37776 141017c7f7a9
child 37920 ea63a2004d09
equal deleted inserted replaced
37777:a4cac7b0ea4f 37778:f10cb49951e1
   110     ('', 'pager', 'auto',
   110     ('', 'pager', 'auto',
   111      _("when to paginate (boolean, always, auto, or never)"), _('TYPE')),
   111      _("when to paginate (boolean, always, auto, or never)"), _('TYPE')),
   112 ]
   112 ]
   113 
   113 
   114 dryrunopts = cmdutil.dryrunopts
   114 dryrunopts = cmdutil.dryrunopts
   115 confirmopts = cmdutil.confirmopts
       
   116 remoteopts = cmdutil.remoteopts
   115 remoteopts = cmdutil.remoteopts
   117 walkopts = cmdutil.walkopts
   116 walkopts = cmdutil.walkopts
   118 commitopts = cmdutil.commitopts
   117 commitopts = cmdutil.commitopts
   119 commitopts2 = cmdutil.commitopts2
   118 commitopts2 = cmdutil.commitopts2
   120 formatteropts = cmdutil.formatteropts
   119 formatteropts = cmdutil.formatteropts
  2060     with ui.formatter('files', opts) as fm:
  2059     with ui.formatter('files', opts) as fm:
  2061         return cmdutil.files(ui, ctx, m, fm, fmt, opts.get('subrepos'))
  2060         return cmdutil.files(ui, ctx, m, fm, fmt, opts.get('subrepos'))
  2062 
  2061 
  2063 @command(
  2062 @command(
  2064     '^forget',
  2063     '^forget',
  2065     walkopts + dryrunopts + confirmopts,
  2064     [('i', 'interactive', None, _('use interactive mode')),
       
  2065     ] + walkopts + dryrunopts,
  2066     _('[OPTION]... FILE...'), inferrepo=True)
  2066     _('[OPTION]... FILE...'), inferrepo=True)
  2067 def forget(ui, repo, *pats, **opts):
  2067 def forget(ui, repo, *pats, **opts):
  2068     """forget the specified files on the next commit
  2068     """forget the specified files on the next commit
  2069 
  2069 
  2070     Mark the specified files so they will no longer be tracked
  2070     Mark the specified files so they will no longer be tracked
  2096     opts = pycompat.byteskwargs(opts)
  2096     opts = pycompat.byteskwargs(opts)
  2097     if not pats:
  2097     if not pats:
  2098         raise error.Abort(_('no files specified'))
  2098         raise error.Abort(_('no files specified'))
  2099 
  2099 
  2100     m = scmutil.match(repo[None], pats, opts)
  2100     m = scmutil.match(repo[None], pats, opts)
  2101     dryrun, confirm = opts.get('dry_run'), opts.get('confirm')
  2101     dryrun, interactive = opts.get('dry_run'), opts.get('interactive')
  2102     rejected = cmdutil.forget(ui, repo, m, prefix="",
  2102     rejected = cmdutil.forget(ui, repo, m, prefix="",
  2103                               explicitonly=False, dryrun=dryrun,
  2103                               explicitonly=False, dryrun=dryrun,
  2104                               confirm=confirm)[0]
  2104                               interactive=interactive)[0]
  2105     return rejected and 1 or 0
  2105     return rejected and 1 or 0
  2106 
  2106 
  2107 @command(
  2107 @command(
  2108     'graft',
  2108     'graft',
  2109     [('r', 'rev', [], _('revisions to graft'), _('REV')),
  2109     [('r', 'rev', [], _('revisions to graft'), _('REV')),