Mercurial > hg
changeset 25550:3e9049876ace
revset: gratuitous code move in '_children'
As 'cs' is empty as the time of the conditional, we can just return an empty
'baseset' and create the variable later.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 11 Jun 2015 14:27:52 -0700 |
parents | f93ff3ab8d14 |
children | c1d163ce7394 |
files | mercurial/revset.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Jun 11 14:26:44 2015 -0700 +++ b/mercurial/revset.py Thu Jun 11 14:27:52 2015 -0700 @@ -614,9 +614,9 @@ return subset.filter(matches) def _children(repo, narrow, parentset): + if not parentset: + return baseset() cs = set() - if not parentset: - return baseset(cs) pr = repo.changelog.parentrevs # XXX this should be 'parentset.min()' assuming 'parentset' is a smartset # (and if it is not, it should.)