Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 19053:f74f2a4e3327
obsolete: extract obsolescence marker pushing into a dedicated function
Having a dedicated function will allows us to experiment with other exchange
strategies in an extension. As we have no solid clues about how to do it right,
being able to experiment is vital.
I intended a more ambitious extraction of push logic, but we are far too
advanced in the release cycle for it.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 17 Apr 2013 11:18:36 +0200 |
parents | 8086b530e2ac |
children | d5f968f7716f |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Apr 18 12:55:58 2013 -0700 +++ b/mercurial/localrepo.py Wed Apr 17 11:18:36 2013 +0200 @@ -1912,17 +1912,7 @@ self.ui.warn(_('updating %s to public failed!\n') % newremotehead) self.ui.debug('try to push obsolete markers to remote\n') - if (obsolete._enabled and self.obsstore and - 'obsolete' in remote.listkeys('namespaces')): - rslts = [] - remotedata = self.listkeys('obsolete') - for key in sorted(remotedata, reverse=True): - # reverse sort to ensure we end with dump0 - data = remotedata[key] - rslts.append(remote.pushkey('obsolete', key, '', data)) - if [r for r in rslts if not r]: - msg = _('failed to push some obsolete markers!\n') - self.ui.warn(msg) + obsolete.syncpush(self, remote) finally: if lock is not None: lock.release()