Commit 4a5488c0 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

obsolete: improve compat with new core dump%i scheme

parent 9dda5c1f6a45
......@@ -436,7 +436,9 @@
if not repo.obsstore:
return {}
data = repo.obsstore._writemarkers()
return {'dump': base85.b85encode(data)}
encdata = base85.b85encode(data)
return {'dump0': encdata,
'dump': encdata} # legacy compat
def pushmarker(repo, key, old, new):
"""Push markers over pushkey"""
......@@ -1189,8 +1191,12 @@
result = opull(remote, *args, **kwargs)
remoteobs = remote.listkeys('obsolete')
if 'dump' in remoteobs:
data = base85.b85decode(remoteobs['dump'])
self.obsstore.mergemarkers(data)
remoteobs['dump0'] = remoteobs.pop('dump')
if 'dump0' in remoteobs:
for key, values in remoteobs.iteritems():
if key.startswith('dump'):
data = base85.b85decode(remoteobs['dump0'])
self.obsstore.mergemarkers(data)
self._clearobsoletecache()
self._turn_extinct_secret()
return result
......@@ -1211,7 +1217,7 @@
raise
if 'obsolete' in remote.listkeys('namespaces') and self.obsstore:
data = self.obsstore._writemarkers()
r = remote.pushkey('obsolete', 'dump', '',
r = remote.pushkey('obsolete', 'dump0', '',
base85.b85encode(data))
if not r:
self.ui.warn(_('failed to push obsolete markers!\n'))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment