mercurial/phases.py
branchstable
changeset 19984 7d5e7799a29f
parent 19951 d51c4d85ec23
child 20550 1716a2671ec7
equal deleted inserted replaced
19980:0151b61fed97 19984:7d5e7799a29f
   183         # phasecache to avoid reference cycles. The changelog instance
   183         # phasecache to avoid reference cycles. The changelog instance
   184         # is not stored because it is a filecache() property and can
   184         # is not stored because it is a filecache() property and can
   185         # be replaced without us being notified.
   185         # be replaced without us being notified.
   186         if rev == nullrev:
   186         if rev == nullrev:
   187             return public
   187             return public
       
   188         if rev < nullrev:
       
   189             raise ValueError(_('cannot lookup negative revision'))
   188         if self._phaserevs is None or rev >= len(self._phaserevs):
   190         if self._phaserevs is None or rev >= len(self._phaserevs):
   189             self._phaserevs = self.getphaserevs(repo, rebuild=True)
   191             self._phaserevs = self.getphaserevs(repo, rebuild=True)
   190         return self._phaserevs[rev]
   192         return self._phaserevs[rev]
   191 
   193 
   192     def write(self):
   194     def write(self):