comparison mercurial/cmdutil.py @ 17207:62c56c94c77e

hidden: move hiddenrevs set on the repository This set is always accessed through the repo for now. Having this set carried by the changelog make it complicated to: - initialize it, computing hidden set may involve revset call - lazy compute it, (1) only the changelog can detect someone access it, (2) only the repo have enought knowledge to compute it. In later version I expect he changelog to apply filtering itself and the set to be carried by changelog again.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 16 Jul 2012 17:44:46 +0200
parents afd75476939e
children 2e0805f59736
comparison
equal deleted inserted replaced
17206:70ebb4bd8083 17207:62c56c94c77e
1394 matcher = revset.match(repo.ui, expr) 1394 matcher = revset.match(repo.ui, expr)
1395 revs = increasingrevs(repo, revs, matcher) 1395 revs = increasingrevs(repo, revs, matcher)
1396 if not opts.get('hidden'): 1396 if not opts.get('hidden'):
1397 # --hidden is still experimental and not worth a dedicated revset 1397 # --hidden is still experimental and not worth a dedicated revset
1398 # yet. Fortunately, filtering revision number is fast. 1398 # yet. Fortunately, filtering revision number is fast.
1399 revs = (r for r in revs if r not in repo.changelog.hiddenrevs) 1399 revs = (r for r in revs if r not in repo.hiddenrevs)
1400 else: 1400 else:
1401 revs = iter(revs) 1401 revs = iter(revs)
1402 return revs, expr, filematcher 1402 return revs, expr, filematcher
1403 1403
1404 def displaygraph(ui, dag, displayer, showparents, edgefn, getrenamed=None, 1404 def displaygraph(ui, dag, displayer, showparents, edgefn, getrenamed=None,