walkchangerevs: simplify by using match.always() method
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 28 Oct 2014 22:32:18 -0700
changeset 24384 5cb459dc32d2
parent 24383 521cecb4a3f1
child 24385 885a573fa619
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()".
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Tue Oct 28 22:43:59 2014 -0700
+++ b/mercurial/cmdutil.py	Tue Oct 28 22:32:18 2014 -0700
@@ -1698,7 +1698,7 @@
     # wanted: a cache of filenames that were changed (ctx.files()) and that
     # match the file filtering conditions.
 
-    if not slowpath and not match.files():
+    if match.always():
         # No files, no patterns.  Display all revs.
         wanted = revs