mercurial/scmutil.py
changeset 17992 c95210b82c0e
parent 17937 3cb032d50447
child 18177 203b7a759218
equal deleted inserted replaced
17991:d605a82cf189 17992:c95210b82c0e
   632 
   632 
   633             if _revrangesep in spec:
   633             if _revrangesep in spec:
   634                 start, end = spec.split(_revrangesep, 1)
   634                 start, end = spec.split(_revrangesep, 1)
   635                 start = revfix(repo, start, 0)
   635                 start = revfix(repo, start, 0)
   636                 end = revfix(repo, end, len(repo) - 1)
   636                 end = revfix(repo, end, len(repo) - 1)
   637                 step = start > end and -1 or 1
   637                 rangeiter = repo.changelog.revs(start, end)
   638                 if not seen and not l:
   638                 if not seen and not l:
   639                     # by far the most common case: revs = ["-1:0"]
   639                     # by far the most common case: revs = ["-1:0"]
   640                     l = range(start, end + step, step)
   640                     l = list(rangeiter)
   641                     # defer syncing seen until next iteration
   641                     # defer syncing seen until next iteration
   642                     continue
   642                     continue
   643                 newrevs = set(xrange(start, end + step, step))
   643                 newrevs = set(rangeiter)
   644                 if seen:
   644                 if seen:
   645                     newrevs.difference_update(seen)
   645                     newrevs.difference_update(seen)
   646                     seen.update(newrevs)
   646                     seen.update(newrevs)
   647                 else:
   647                 else:
   648                     seen = newrevs
   648                     seen = newrevs