Mercurial > hg-stable
diff mercurial/branchmap.py @ 23862:7aa1405528a3
branchcache: add debug output whenever cache files use truncate
The cache files are usually append only but will automatically be truncated and
recover in exceptional situations. Add a debug notice when such exceptional
situations are encountered.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 14 Jan 2015 01:15:26 +0100 |
parents | 6bf93440a717 |
children | 669106fc5bb1 |
line wrap: on
line diff
--- a/mercurial/branchmap.py Wed Jan 14 01:15:26 2015 +0100 +++ b/mercurial/branchmap.py Wed Jan 14 01:15:26 2015 +0100 @@ -414,6 +414,7 @@ f.write('\0') else: f.close() + repo.ui.debug("%s changed - rewriting it\n" % _rbcnames) self._rbcnamescount = 0 self._rbcrevslen = 0 if self._rbcnamescount == 0: @@ -438,6 +439,7 @@ # see issue3543. SEEK_END was added in 2.5 f.seek(0, 2) #os.SEEK_END if f.tell() != start: + repo.ui.debug("truncating %s to %s\n" % (_rbcrevs, start)) f.seek(start) f.truncate() end = self._rbcrevslen * _rbcrecsize