# HG changeset patch # User Pierre-Yves David # Date 2014-09-30 17:39:21 # Node ID 2717dcff7be1bf1e6625c54e6f2717baa741d6cb # Parent 753515d9e274c80d3168baa58b82f80df4c3f0f7 revset: use a single return statement in matcher function This makes it easy to insert post processing and debug code on the returned value. diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2063,8 +2063,10 @@ def match(ui, spec, repo=None): 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):