##// END OF EJS Templates
revlog: make "size" diverge from "rawsize"...
Jun Wu -
r31856:0ab7f469 default
parent child Browse files
Show More
@@ -446,7 +446,16 b' class revlog(object):'
446
446
447 t = self.revision(rev, raw=True)
447 t = self.revision(rev, raw=True)
448 return len(t)
448 return len(t)
449 size = rawsize
449
450 def size(self, rev):
451 """length of non-raw text (processed by a "read" flag processor)"""
452 # fast path: if no "read" flag processor could change the content,
453 # size is rawsize. note: ELLIPSIS is known to not change the content.
454 flags = self.flags(rev)
455 if flags & (REVIDX_KNOWN_FLAGS ^ REVIDX_ELLIPSIS) == 0:
456 return self.rawsize(rev)
457
458 return len(self.revision(rev, raw=False))
450
459
451 def chainbase(self, rev):
460 def chainbase(self, rev):
452 base = self._chainbasecache.get(rev)
461 base = self._chainbasecache.get(rev)
@@ -244,5 +244,4 b''
244 # TEST: hg status
244 # TEST: hg status
245
245
246 $ hg status
246 $ hg status
247 M base64
248 $ hg diff
247 $ hg diff
General Comments 0
You need to be logged in to leave comments. Login now