equal
deleted
inserted
replaced
867 This method returns the rank retrieved from the revlog in constant |
867 This method returns the rank retrieved from the revlog in constant |
868 time. It makes no attempt at computing unknown values for versions of |
868 time. It makes no attempt at computing unknown values for versions of |
869 the revlog which do not persist the rank. |
869 the revlog which do not persist the rank. |
870 """ |
870 """ |
871 rank = self.index[rev][ENTRY_RANK] |
871 rank = self.index[rev][ENTRY_RANK] |
872 if rank == RANK_UNKNOWN: |
872 if self._format_version != CHANGELOGV2 or rank == RANK_UNKNOWN: |
873 return None |
873 return None |
|
874 if rev == nullrev: |
|
875 return 0 # convention |
874 return rank |
876 return rank |
875 |
877 |
876 def chainbase(self, rev): |
878 def chainbase(self, rev): |
877 base = self._chainbasecache.get(rev) |
879 base = self._chainbasecache.get(rev) |
878 if base is not None: |
880 if base is not None: |