From patchwork Thu Feb 20 18:36:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1, of, 4, RFC] scmutil: changed revrange to return lazysets for new style revsets From: Lucas Moscovicz X-Patchwork-Id: 3726 Message-Id: <91b77bbaa0970724742e.1392921390@dev1037.prn2.facebook.com> To: mercurial-devel@selenic.com Date: Thu, 20 Feb 2014 10:36:30 -0800 # HG changeset patch # User Lucas Moscovicz # Date 1392247827 28800 # Wed Feb 12 15:30:27 2014 -0800 # Node ID 91b77bbaa0970724742e9d2700e1123403b9d386 # Parent d9bb5abb1c584e3e04ac3632805ff8886b1a2973 scmutil: changed revrange to return lazysets for new style revsets When there is an old style revset or both it will still return a baseset. This may be changed in later patches. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -524,11 +524,14 @@ # fall through to new-style queries if old-style fails m = revset.match(repo.ui, spec) - dl = [r for r in m(repo, revset.spanset(repo)) if r not in seen] - l.extend(dl) - seen.update(dl) + if seen or l: + dl = [r for r in m(repo, revset.spanset(repo)) if r not in seen] + l.extend(dl) + seen.update(dl) + else: + l = m(repo, revset.spanset(repo)) - return revset.baseset(l) + return l def expandpats(pats): if not util.expandglobs: