equal
deleted
inserted
replaced
381 return 1 |
381 return 1 |
382 finally: |
382 finally: |
383 tr.release() |
383 tr.release() |
384 finally: |
384 finally: |
385 lock.release() |
385 lock.release() |
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 |
386 |
403 def syncpull(repo, remote, gettransaction): |
387 def syncpull(repo, remote, gettransaction): |
404 """utility function to pull obsolete markers from a remote |
388 """utility function to pull obsolete markers from a remote |
405 |
389 |
406 The `gettransaction` is function that return the pull transaction, creating |
390 The `gettransaction` is function that return the pull transaction, creating |