Mercurial > hg-stable
changeset 11693:ff33f937a7da
revlog: add a flags method that returns revision flags
author | Pradeepkumar Gayam <in3xes@gmail.com> |
---|---|
date | Tue, 27 Jul 2010 01:16:38 +0530 |
parents | c5e555e064d0 |
children | bf49d48e4602 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Sun Jul 25 21:20:05 2010 -0500 +++ b/mercurial/revlog.py Tue Jul 27 01:16:38 2010 +0530 @@ -533,6 +533,8 @@ return self.index[rev][1] def base(self, rev): return self.index[rev][3] + def flags(self, rev): + return self.index[rev][0] & 0xFFFF def size(self, rev): """return the length of the uncompressed text for a given revision""" @@ -1020,9 +1022,9 @@ base = self.base(rev) # check rev flags - if self.index[rev][0] & 0xFFFF: + if self.flags(rev): raise RevlogError(_('incompatible revision flag %x') % - (self.index[rev][0] & 0xFFFF)) + (self.flags(rev))) # do we have useful data cached? if self._cache and self._cache[1] >= base and self._cache[1] < rev: