# HG changeset patch # User Durham Goode # Date 1395334544 25200 # Node ID 170d6d591a7dbc09bfe1b509dfd8f39991e653a9 # Parent e286ab22e46157e0d159982e85bf32d704c44420 scmutil: fix revrange when multiple revs are specified revrange was trying to add a list to a revset class, but revset classes only support adding with other revset classes. So wrap the lists in basesets. diff -r e286ab22e461 -r 170d6d591a7d mercurial/scmutil.py --- a/mercurial/scmutil.py Thu Mar 20 00:01:59 2014 -0400 +++ b/mercurial/scmutil.py Thu Mar 20 09:55:44 2014 -0700 @@ -499,7 +499,7 @@ try: if isinstance(spec, int): seen.add(spec) - l = l + [spec] + l = l + revset.baseset([spec]) continue if _revrangesep in spec: @@ -520,14 +520,14 @@ seen.update(newrevs) else: seen = newrevs - l = l + sorted(newrevs, reverse=start > end) + l = l + revset.baseset(sorted(newrevs, reverse=start > end)) continue elif spec and spec in repo: # single unquoted rev rev = revfix(repo, spec, None) if rev in seen: continue seen.add(rev) - l = l + [rev] + l = l + revset.baseset([rev]) continue except error.RepoLookupError: pass @@ -536,7 +536,7 @@ m = revset.match(repo.ui, spec, repo) if seen or l: dl = [r for r in m(repo, revset.spanset(repo)) if r not in seen] - l = l + dl + l = l + revset.baseset(dl) seen.update(dl) else: l = m(repo, revset.spanset(repo)) diff -r e286ab22e461 -r 170d6d591a7d tests/test-revset.t --- a/tests/test-revset.t Thu Mar 20 00:01:59 2014 -0400 +++ b/tests/test-revset.t Thu Mar 20 09:55:44 2014 -0700 @@ -734,6 +734,16 @@ hg: parse error: ^ expects a number 0, 1, or 2 [255] +multiple revspecs + + $ hg log -r 'tip~1:tip' -r 'tip~2:tip~1' --template '{rev}\n' + 8 + 9 + 4 + 5 + 6 + 7 + aliases: $ echo '[revsetalias]' >> .hg/hgrc