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.
--- 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.)