Mercurial > hg
changeset 9163:f193b643d1b1
changelog: _delaycount -> _divert
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 18 Jul 2009 11:25:54 -0500 |
parents | 47ce7a3a1fb0 |
children | b0d995b6b0a6 |
files | mercurial/changelog.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changelog.py Thu Jul 16 15:40:13 2009 -0500 +++ b/mercurial/changelog.py Sat Jul 18 11:25:54 2009 -0500 @@ -91,12 +91,14 @@ def __init__(self, opener): self._realopener = opener self._delayed = False + self._divert = False revlog.revlog.__init__(self, self._delayopener, "00changelog.i") + def delayupdate(self): "delay visibility of index updates to other readers" self._delayed = True - self._delaycount = len(self) + self._divert = (len(self) == 0) self._delaybuf = [] self._delayname = None @@ -120,7 +122,7 @@ if not self._delayed or not name == self.indexfile: return fp # if we're doing an initial clone, divert to another file - if self._delaycount == 0: + if self._divert: self._delayname = fp.name if not len(self): # make sure to truncate the file