# HG changeset patch # User Martin von Zweigbergk # Date 1548362874 28800 # Node ID a728ef2f9b15e8b4a7d5d15928c26c074293da92 # Parent 5079242abef9601a1007015a9b5191d40553009d revpair: clarify check for empty revset Differential Revision: https://phab.mercurial-scm.org/D5688 diff -r 5079242abef9 -r a728ef2f9b15 mercurial/scmutil.py --- a/mercurial/scmutil.py Thu Jan 24 12:38:19 2019 -0800 +++ b/mercurial/scmutil.py Thu Jan 24 12:47:54 2019 -0800 @@ -672,11 +672,12 @@ l = revrange(repo, revs) + if not l: + raise error.Abort(_('empty revision range')) + first = l.first() second = l.last() - if first is None: - raise error.Abort(_('empty revision range')) if (first == second and len(revs) >= 2 and not all(revrange(repo, [r]) for r in revs)): raise error.Abort(_('empty revision on one side of range'))