mercurial/cmdutil.py
changeset 24450 961790c35b4f
parent 24449 bab983bb6fd1
child 24451 c3bbafef25d6
equal deleted inserted replaced
24449:bab983bb6fd1 24450:961790c35b4f
  2809         ## filling of the `names` mapping
  2809         ## filling of the `names` mapping
  2810         # walk dirstate to fill `names`
  2810         # walk dirstate to fill `names`
  2811 
  2811 
  2812         wctx = repo[None]
  2812         wctx = repo[None]
  2813         m = scmutil.match(wctx, pats, opts)
  2813         m = scmutil.match(wctx, pats, opts)
  2814         if not m.always() or node != parent:
  2814         if not m.always():
  2815             m.bad = lambda x, y: False
  2815             m.bad = lambda x, y: False
  2816             for abs in repo.walk(m):
  2816             for abs in repo.walk(m):
  2817                 names[abs] = m.rel(abs), m.exact(abs)
  2817                 names[abs] = m.rel(abs), m.exact(abs)
  2818 
  2818 
  2819             # walk target manifest to fill `names`
  2819             # walk target manifest to fill `names`
  2838             m = scmutil.matchfiles(repo, names)
  2838             m = scmutil.matchfiles(repo, names)
  2839 
  2839 
  2840             changes = repo.status(node1=node, match=m,
  2840             changes = repo.status(node1=node, match=m,
  2841                                   unknown=True, ignored=True, clean=True)
  2841                                   unknown=True, ignored=True, clean=True)
  2842         else:
  2842         else:
  2843             changes = repo.status(match=m)
  2843             changes = repo.status(node1=node, match=m)
  2844             for kind in changes:
  2844             for kind in changes:
  2845                 for abs in kind:
  2845                 for abs in kind:
  2846                     names[abs] = m.rel(abs), m.exact(abs)
  2846                     names[abs] = m.rel(abs), m.exact(abs)
  2847 
  2847 
  2848             m = scmutil.matchfiles(repo, names)
  2848             m = scmutil.matchfiles(repo, names)