mercurial/phases.py
branchstable
changeset 19984 7d5e7799a29f
parent 19951 d51c4d85ec23
child 20550 1716a2671ec7
--- a/mercurial/phases.py	Tue Nov 05 10:55:45 2013 +0100
+++ b/mercurial/phases.py	Mon Nov 04 19:59:00 2013 -0800
@@ -185,6 +185,8 @@
         # be replaced without us being notified.
         if rev == nullrev:
             return public
+        if rev < nullrev:
+            raise ValueError(_('cannot lookup negative revision'))
         if self._phaserevs is None or rev >= len(self._phaserevs):
             self._phaserevs = self.getphaserevs(repo, rebuild=True)
         return self._phaserevs[rev]