revpair: drop useless conditional
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 20 Mar 2014 17:34:02 -0700
changeset 20819 202291a280fb
parent 20818 c7d543eebe1a
child 20820 f8e531a3a77c
revpair: drop useless conditional The `if not revs:` case is tested at the beginning of the function.
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Fri Mar 21 17:20:56 2014 -0500
+++ b/mercurial/scmutil.py	Thu Mar 20 17:34:02 2014 -0700
@@ -471,9 +471,7 @@
     l = revrange(repo, revs)
 
     if len(l) == 0:
-        if revs:
-            raise util.Abort(_('empty revision range'))
-        return repo.dirstate.p1(), None
+        raise util.Abort(_('empty revision range'))
 
     if len(l) == 1 and len(revs) == 1 and _revrangesep not in revs[0]:
         return repo.lookup(l[0]), None