mercurial/commands.py
changeset 36939 45bfcd16f27e
parent 36842 ff541b8cdee0
child 36960 66651ec259ea
equal deleted inserted replaced
36938:8fd9b56e8d7c 36939:45bfcd16f27e
  2034     m = scmutil.match(ctx, pats, opts)
  2034     m = scmutil.match(ctx, pats, opts)
  2035     ui.pager('files')
  2035     ui.pager('files')
  2036     with ui.formatter('files', opts) as fm:
  2036     with ui.formatter('files', opts) as fm:
  2037         return cmdutil.files(ui, ctx, m, fm, fmt, opts.get('subrepos'))
  2037         return cmdutil.files(ui, ctx, m, fm, fmt, opts.get('subrepos'))
  2038 
  2038 
  2039 @command('^forget', walkopts, _('[OPTION]... FILE...'), inferrepo=True)
  2039 @command(
       
  2040     '^forget',
       
  2041     walkopts + dryrunopts,
       
  2042     _('[OPTION]... FILE...'), inferrepo=True)
  2040 def forget(ui, repo, *pats, **opts):
  2043 def forget(ui, repo, *pats, **opts):
  2041     """forget the specified files on the next commit
  2044     """forget the specified files on the next commit
  2042 
  2045 
  2043     Mark the specified files so they will no longer be tracked
  2046     Mark the specified files so they will no longer be tracked
  2044     after the next commit.
  2047     after the next commit.
  2069     opts = pycompat.byteskwargs(opts)
  2072     opts = pycompat.byteskwargs(opts)
  2070     if not pats:
  2073     if not pats:
  2071         raise error.Abort(_('no files specified'))
  2074         raise error.Abort(_('no files specified'))
  2072 
  2075 
  2073     m = scmutil.match(repo[None], pats, opts)
  2076     m = scmutil.match(repo[None], pats, opts)
  2074     rejected = cmdutil.forget(ui, repo, m, prefix="", explicitonly=False)[0]
  2077     dryrun = opts.get(r'dry_run')
       
  2078     rejected = cmdutil.forget(ui, repo, m, prefix="",
       
  2079                               explicitonly=False, dryrun=dryrun)[0]
  2075     return rejected and 1 or 0
  2080     return rejected and 1 or 0
  2076 
  2081 
  2077 @command(
  2082 @command(
  2078     'graft',
  2083     'graft',
  2079     [('r', 'rev', [], _('revisions to graft'), _('REV')),
  2084     [('r', 'rev', [], _('revisions to graft'), _('REV')),