[PATCH 1 of 7] walkchangerevs: simplify with an 'elif'
Martin von Zweigbergk
martinvonz at google.com
Thu May 21 21:32:28 UTC 2015
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1432243224 25200
# Thu May 21 14:20:24 2015 -0700
# Node ID 2d9c6fe9c552ede353adb4df22da54fddac7b320
# Parent aa36204766e4bc510d2e24d7279f6bc989b613bb
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()'.
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1761,8 +1761,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:
More information about the Mercurial-devel
mailing list