revset: use a single return statement in matcher function
This makes it easy to insert post processing and debug code on the returned
value.
--- a/mercurial/revset.py Thu Oct 02 16:57:51 2014 -0500
+++ b/mercurial/revset.py Tue Sep 30 12:39:21 2014 -0500
@@ -2063,8 +2063,10 @@
weight, tree = optimize(tree, True)
def mfunc(repo, subset):
if util.safehasattr(subset, 'set'):
- return getset(repo, subset, tree)
- return getset(repo, baseset(subset), tree)
+ result = getset(repo, subset, tree)
+ else:
+ result = getset(repo, baseset(subset), tree)
+ return result
return mfunc
def formatspec(expr, *args):