mercurial/cmdutil.py
branchstable
changeset 23965 6156edaa82aa
parent 23955 8a29897d42d2
child 23967 448bb32b8ee6
equal deleted inserted replaced
23964:f1c127df7c4f 23965:6156edaa82aa
  2763             (clean,         actions['noop'],     discard),
  2763             (clean,         actions['noop'],     discard),
  2764             # Existing file, not tracked anywhere
  2764             # Existing file, not tracked anywhere
  2765             (unknown,       actions['unknown'],  discard),
  2765             (unknown,       actions['unknown'],  discard),
  2766             )
  2766             )
  2767 
  2767 
  2768         needdata = ('revert', 'add', 'undelete')
       
  2769         _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata])
       
  2770 
       
  2771         wctx = repo[None]
  2768         wctx = repo[None]
  2772         for abs, (rel, exact) in sorted(names.items()):
  2769         for abs, (rel, exact) in sorted(names.items()):
  2773             # target file to be touch on disk (relative to cwd)
  2770             # target file to be touch on disk (relative to cwd)
  2774             target = repo.wjoin(abs)
  2771             target = repo.wjoin(abs)
  2775             # search the entry in the dispatch table.
  2772             # search the entry in the dispatch table.
  2795                     ui.warn(msg % rel)
  2792                     ui.warn(msg % rel)
  2796                 break
  2793                 break
  2797 
  2794 
  2798 
  2795 
  2799         if not opts.get('dry_run'):
  2796         if not opts.get('dry_run'):
       
  2797             needdata = ('revert', 'add', 'undelete')
       
  2798             _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata])
       
  2799 
  2800             _performrevert(repo, parents, ctx, actions)
  2800             _performrevert(repo, parents, ctx, actions)
  2801 
  2801 
  2802             # get the list of subrepos that must be reverted
  2802             # get the list of subrepos that must be reverted
  2803             subrepomatch = scmutil.match(ctx, pats, opts)
  2803             subrepomatch = scmutil.match(ctx, pats, opts)
  2804             targetsubs = sorted(s for s in ctx.substate if subrepomatch(s))
  2804             targetsubs = sorted(s for s in ctx.substate if subrepomatch(s))