mercurial/commands.py
changeset 6603 41eb20cc1c02
parent 6602 a57a27b12965
child 6605 bf2bf986ff87
equal deleted inserted replaced
6602:a57a27b12965 6603:41eb20cc1c02
  2178     after, force = opts.get('after'), opts.get('force')
  2178     after, force = opts.get('after'), opts.get('force')
  2179     if not pats and not after:
  2179     if not pats and not after:
  2180         raise util.Abort(_('no files specified'))
  2180         raise util.Abort(_('no files specified'))
  2181 
  2181 
  2182     m = cmdutil.match(repo, pats, opts)
  2182     m = cmdutil.match(repo, pats, opts)
  2183     mardu = map(dict.fromkeys, repo.status(files=m.files(), match=m))[:5]
  2183     mardu = map(dict.fromkeys, repo.status(match=m))[:5]
  2184     modified, added, removed, deleted, unknown = mardu
  2184     modified, added, removed, deleted, unknown = mardu
  2185 
  2185 
  2186     remove, forget = [], []
  2186     remove, forget = [], []
  2187     for abs in repo.walk(m):
  2187     for abs in repo.walk(m):
  2188 
  2188 
  2361         for abs in repo.walk(m, node=node):
  2361         for abs in repo.walk(m, node=node):
  2362             if abs not in names:
  2362             if abs not in names:
  2363                 names[abs] = m.rel(abs), m.exact(abs)
  2363                 names[abs] = m.rel(abs), m.exact(abs)
  2364 
  2364 
  2365         m = cmdutil.matchfiles(repo, names)
  2365         m = cmdutil.matchfiles(repo, names)
  2366         changes = repo.status(files=m.files(), match=m)[:4]
  2366         changes = repo.status(match=m)[:4]
  2367         modified, added, removed, deleted = map(dict.fromkeys, changes)
  2367         modified, added, removed, deleted = map(dict.fromkeys, changes)
  2368 
  2368 
  2369         # if f is a rename, also revert the source
  2369         # if f is a rename, also revert the source
  2370         cwd = repo.getcwd()
  2370         cwd = repo.getcwd()
  2371         for f in added:
  2371         for f in added:
  2628     node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
  2628     node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
  2629 
  2629 
  2630     matcher = cmdutil.match(repo, pats, opts)
  2630     matcher = cmdutil.match(repo, pats, opts)
  2631     cwd = (pats and repo.getcwd()) or ''
  2631     cwd = (pats and repo.getcwd()) or ''
  2632     modified, added, removed, deleted, unknown, ignored, clean = [
  2632     modified, added, removed, deleted, unknown, ignored, clean = [
  2633         n for n in repo.status(node1, node2, matcher.files(), matcher,
  2633         n for n in repo.status(node1, node2, matcher,
  2634                                list_ignored=opts['ignored']
  2634                                list_ignored=opts['ignored']
  2635                                             or all and not ui.quiet,
  2635                                             or all and not ui.quiet,
  2636                                list_clean=opts['clean'] or all,
  2636                                list_clean=opts['clean'] or all,
  2637                                list_unknown=opts['unknown']
  2637                                list_unknown=opts['unknown']
  2638                                             or not (ui.quiet or
  2638                                             or not (ui.quiet or