Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 17125:95d785ccb4e5
obsolete: append new markers to obsstore file instead of rewriting everything
This is the second step toward incremental writing of marker inside a
transaction. The obsstore file is now handled append only.
Header writing have been extracted from _writemarkers.
Because the _writemarkers method have been dropped, the push code
directly reuse the serialised content of local repo `listkeys`. This
is not very pretty, but this part of the protocol still need major
improvement anyway.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Wed, 04 Jul 2012 02:02:48 +0200 |
parents | f1b7683f3f95 |
children | 8fa8717b47b6 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Jul 04 02:00:36 2012 +0200 +++ b/mercurial/localrepo.py Wed Jul 04 02:02:48 2012 +0200 @@ -1808,9 +1808,8 @@ self.ui.warn(_('updating %s to public failed!\n') % newremotehead) if 'obsolete' in self.listkeys('namespaces') and self.obsstore: - data = self.obsstore._writemarkers() - r = remote.pushkey('obsolete', 'dump', '', - base85.b85encode(data)) + data = self.listkeys('obsolete')['dump'] + r = remote.pushkey('obsolete', 'dump', '', data) if not r: self.ui.warn(_('failed to push obsolete markers!\n')) finally: