##// END OF EJS Templates
scmutil: changed revrange code not to use append...
Lucas Moscovicz -
r20559:165b117f default
parent child Browse files
Show More
@@ -490,7 +490,7 b' def revrange(repo, revs):'
490 return defval
490 return defval
491 return repo[val].rev()
491 return repo[val].rev()
492
492
493 seen, l = set(), []
493 seen, l = set(), revset.baseset([])
494 for spec in revs:
494 for spec in revs:
495 if l and not seen:
495 if l and not seen:
496 seen = set(l)
496 seen = set(l)
@@ -511,7 +511,7 b' def revrange(repo, revs):'
511 rangeiter = repo.changelog.revs(start, end)
511 rangeiter = repo.changelog.revs(start, end)
512 if not seen and not l:
512 if not seen and not l:
513 # by far the most common case: revs = ["-1:0"]
513 # by far the most common case: revs = ["-1:0"]
514 l = list(rangeiter)
514 l = revset.baseset(rangeiter)
515 # defer syncing seen until next iteration
515 # defer syncing seen until next iteration
516 continue
516 continue
517 newrevs = set(rangeiter)
517 newrevs = set(rangeiter)
@@ -527,7 +527,7 b' def revrange(repo, revs):'
527 if rev in seen:
527 if rev in seen:
528 continue
528 continue
529 seen.add(rev)
529 seen.add(rev)
530 l.append(rev)
530 l = l + [rev]
531 continue
531 continue
532 except error.RepoLookupError:
532 except error.RepoLookupError:
533 pass
533 pass
General Comments 0
You need to be logged in to leave comments. Login now