mercurial/cmdutil.py
changeset 17424 e7cfe3587ea4
parent 17391 fc24c10424d2
child 17460 a306837f8c87
equal deleted inserted replaced
17406:fc14953e8e34 17424:e7cfe3587ea4
  1256     # branch and only_branch are really aliases and must be handled at
  1256     # branch and only_branch are really aliases and must be handled at
  1257     # the same time
  1257     # the same time
  1258     opts['branch'] = opts.get('branch', []) + opts.get('only_branch', [])
  1258     opts['branch'] = opts.get('branch', []) + opts.get('only_branch', [])
  1259     opts['branch'] = [repo.lookupbranch(b) for b in opts['branch']]
  1259     opts['branch'] = [repo.lookupbranch(b) for b in opts['branch']]
  1260     # pats/include/exclude are passed to match.match() directly in
  1260     # pats/include/exclude are passed to match.match() directly in
  1261     # _matchfile() revset but walkchangerevs() builds its matcher with
  1261     # _matchfiles() revset but walkchangerevs() builds its matcher with
  1262     # scmutil.match(). The difference is input pats are globbed on
  1262     # scmutil.match(). The difference is input pats are globbed on
  1263     # platforms without shell expansion (windows).
  1263     # platforms without shell expansion (windows).
  1264     pctx = repo[None]
  1264     pctx = repo[None]
  1265     match, pats = scmutil.matchandpats(pctx, pats, opts)
  1265     match, pats = scmutil.matchandpats(pctx, pats, opts)
  1266     slowpath = match.anypats() or (match.files() and opts.get('removed'))
  1266     slowpath = match.anypats() or (match.files() and opts.get('removed'))
  1302         if follow:
  1302         if follow:
  1303             fpats = ('_patsfollow', '_patsfollowfirst')
  1303             fpats = ('_patsfollow', '_patsfollowfirst')
  1304             fnopats = (('_ancestors', '_fancestors'),
  1304             fnopats = (('_ancestors', '_fancestors'),
  1305                        ('_descendants', '_fdescendants'))
  1305                        ('_descendants', '_fdescendants'))
  1306             if pats:
  1306             if pats:
  1307                 # follow() revset inteprets its file argument as a
  1307                 # follow() revset interprets its file argument as a
  1308                 # manifest entry, so use match.files(), not pats.
  1308                 # manifest entry, so use match.files(), not pats.
  1309                 opts[fpats[followfirst]] = list(match.files())
  1309                 opts[fpats[followfirst]] = list(match.files())
  1310             else:
  1310             else:
  1311                 opts[fnopats[followdescendants][followfirst]] = str(startrev)
  1311                 opts[fnopats[followdescendants][followfirst]] = str(startrev)
  1312         else:
  1312         else: