Show More
@@ -247,7 +247,7 b' def push(repo, remote, force=False, revs' | |||
|
247 | 247 | pushop.ui.warn(_('updating %s to public failed!\n') |
|
248 | 248 | % newremotehead) |
|
249 | 249 | pushop.ui.debug('try to push obsolete markers to remote\n') |
|
250 |
obsolete |
|
|
250 | _pushobsolete(pushop.repo, pushop.remote) | |
|
251 | 251 | finally: |
|
252 | 252 | if lock is not None: |
|
253 | 253 | lock.release() |
@@ -258,6 +258,22 b' def push(repo, remote, force=False, revs' | |||
|
258 | 258 | _pushbookmark(pushop) |
|
259 | 259 | return ret |
|
260 | 260 | |
|
261 | def _pushobsolete(repo, remote): | |
|
262 | """utility function to push obsolete markers to a remote | |
|
263 | ||
|
264 | Exist mostly to allow overriding for experimentation purpose""" | |
|
265 | if (obsolete._enabled and repo.obsstore and | |
|
266 | 'obsolete' in remote.listkeys('namespaces')): | |
|
267 | rslts = [] | |
|
268 | remotedata = repo.listkeys('obsolete') | |
|
269 | for key in sorted(remotedata, reverse=True): | |
|
270 | # reverse sort to ensure we end with dump0 | |
|
271 | data = remotedata[key] | |
|
272 | rslts.append(remote.pushkey('obsolete', key, '', data)) | |
|
273 | if [r for r in rslts if not r]: | |
|
274 | msg = _('failed to push some obsolete markers!\n') | |
|
275 | repo.ui.warn(msg) | |
|
276 | ||
|
261 | 277 | def _pushbookmark(pushop): |
|
262 | 278 | """Update bookmark position on remote""" |
|
263 | 279 | ui = pushop.ui |
@@ -384,22 +384,6 b' def pushmarker(repo, key, old, new):' | |||
|
384 | 384 | finally: |
|
385 | 385 | lock.release() |
|
386 | 386 | |
|
387 | def syncpush(repo, remote): | |
|
388 | """utility function to push obsolete markers to a remote | |
|
389 | ||
|
390 | Exist mostly to allow overriding for experimentation purpose""" | |
|
391 | if (_enabled and repo.obsstore and | |
|
392 | 'obsolete' in remote.listkeys('namespaces')): | |
|
393 | rslts = [] | |
|
394 | remotedata = repo.listkeys('obsolete') | |
|
395 | for key in sorted(remotedata, reverse=True): | |
|
396 | # reverse sort to ensure we end with dump0 | |
|
397 | data = remotedata[key] | |
|
398 | rslts.append(remote.pushkey('obsolete', key, '', data)) | |
|
399 | if [r for r in rslts if not r]: | |
|
400 | msg = _('failed to push some obsolete markers!\n') | |
|
401 | repo.ui.warn(msg) | |
|
402 | ||
|
403 | 387 | def syncpull(repo, remote, gettransaction): |
|
404 | 388 | """utility function to pull obsolete markers from a remote |
|
405 | 389 |
General Comments 0
You need to be logged in to leave comments.
Login now