Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 18411:8b0f0dd56cec
bundlerepo: improve performance for bundle() revset expression
Create the set of revision numbers directly instead of creating a list of nodes
first.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 16 Jan 2013 20:41:34 +0100 |
parents | f3b21beb9802 |
children | 692cbda1eb50 |
comparison
equal
deleted
inserted
replaced
18410:de7dac2a58e8 | 18411:8b0f0dd56cec |
---|---|
448 Changesets in the bundle. | 448 Changesets in the bundle. |
449 | 449 |
450 Bundle must be specified by the -R option.""" | 450 Bundle must be specified by the -R option.""" |
451 | 451 |
452 try: | 452 try: |
453 bundlenodes = repo.changelog.bundlenodes | 453 bundlerevs = repo.changelog.bundlerevs |
454 except AttributeError: | 454 except AttributeError: |
455 raise util.Abort(_("no bundle provided - specify with -R")) | 455 raise util.Abort(_("no bundle provided - specify with -R")) |
456 revs = set(repo[n].rev() for n in bundlenodes) | 456 return [r for r in subset if r in bundlerevs] |
457 return [r for r in subset if r in revs] | |
458 | 457 |
459 def checkstatus(repo, subset, pat, field): | 458 def checkstatus(repo, subset, pat, field): |
460 m = None | 459 m = None |
461 s = [] | 460 s = [] |
462 hasset = matchmod.patkind(pat) == 'set' | 461 hasset = matchmod.patkind(pat) == 'set' |