# HG changeset patch # User Pierre-Yves David # Date 1412621012 25200 # Node ID 8110405cf8aeab8d183eeb3750b3cf81baaf11c1 # Parent 5a96df266b2b9d74efa0016fd5703e64dccb3fce revset-limit: use boolean testing instead of `len(revs) < 1` I'm not sure why we wrote it that way. But smartsets have faster/lazier non-zero testing than length computation. diff -r 5a96df266b2b -r 8110405cf8ae mercurial/scmutil.py --- a/mercurial/scmutil.py Tue Oct 07 00:18:08 2014 -0700 +++ b/mercurial/scmutil.py Mon Oct 06 11:43:32 2014 -0700 @@ -478,7 +478,7 @@ return repo[default] l = revrange(repo, [revspec]) - if len(l) < 1: + if not l: raise util.Abort(_('empty revision set')) return repo[l[-1]]