comparison mercurial/cmdutil.py @ 24384:5cb459dc32d2

walkchangerevs: simplify by using match.always() method Since "slowpath = match.anypats() or (match.files() and opts.get('removed'))", we can simplify the condition "not slowpath and not match.files()" to "not match.anypats() and not match.files()", which is equivalent to "match.always()".
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 28 Oct 2014 22:32:18 -0700
parents 8c445d8a915b
children 6c3a93e690c7
comparison
equal deleted inserted replaced
24383:521cecb4a3f1 24384:5cb459dc32d2
1696 # First step is to fill wanted, the set of revisions that we want to yield. 1696 # First step is to fill wanted, the set of revisions that we want to yield.
1697 # When it does not induce extra cost, we also fill fncache for revisions in 1697 # When it does not induce extra cost, we also fill fncache for revisions in
1698 # wanted: a cache of filenames that were changed (ctx.files()) and that 1698 # wanted: a cache of filenames that were changed (ctx.files()) and that
1699 # match the file filtering conditions. 1699 # match the file filtering conditions.
1700 1700
1701 if not slowpath and not match.files(): 1701 if match.always():
1702 # No files, no patterns. Display all revs. 1702 # No files, no patterns. Display all revs.
1703 wanted = revs 1703 wanted = revs
1704 1704
1705 if not slowpath and match.files(): 1705 if not slowpath and match.files():
1706 # We only have to read through the filelog to find wanted revisions 1706 # We only have to read through the filelog to find wanted revisions