walkchangerevs: simplify with an 'elif'
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 21 May 2015 14:20:24 -0700
changeset 25271 1b1eaf1885df
parent 25270 61b3529e2377
child 25272 6c76c42a5893
walkchangerevs: simplify with an 'elif' Since 'match.files()' is interchangeable with 'not match.files()', we can simplify with an 'elif' follwoing the 'if match.always()'.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Tue May 26 07:44:37 2015 -0500
+++ b/mercurial/cmdutil.py	Thu May 21 14:20:24 2015 -0700
@@ -1767,8 +1767,7 @@
     if match.always():
         # No files, no patterns.  Display all revs.
         wanted = revs
-
-    if not slowpath and match.files():
+    elif not slowpath:
         # We only have to read through the filelog to find wanted revisions
 
         try: