Show More
@@ -1912,17 +1912,7 b' class localrepository(object):' | |||||
1912 | self.ui.warn(_('updating %s to public failed!\n') |
|
1912 | self.ui.warn(_('updating %s to public failed!\n') | |
1913 | % newremotehead) |
|
1913 | % newremotehead) | |
1914 | self.ui.debug('try to push obsolete markers to remote\n') |
|
1914 | self.ui.debug('try to push obsolete markers to remote\n') | |
1915 |
|
|
1915 | obsolete.syncpush(self, remote) | |
1916 | 'obsolete' in remote.listkeys('namespaces')): |
|
|||
1917 | rslts = [] |
|
|||
1918 | remotedata = self.listkeys('obsolete') |
|
|||
1919 | for key in sorted(remotedata, reverse=True): |
|
|||
1920 | # reverse sort to ensure we end with dump0 |
|
|||
1921 | data = remotedata[key] |
|
|||
1922 | rslts.append(remote.pushkey('obsolete', key, '', data)) |
|
|||
1923 | if [r for r in rslts if not r]: |
|
|||
1924 | msg = _('failed to push some obsolete markers!\n') |
|
|||
1925 | self.ui.warn(msg) |
|
|||
1926 | finally: |
|
1916 | finally: | |
1927 | if lock is not None: |
|
1917 | if lock is not None: | |
1928 | lock.release() |
|
1918 | lock.release() |
@@ -370,6 +370,22 b' def pushmarker(repo, key, old, new):' | |||||
370 | finally: |
|
370 | finally: | |
371 | lock.release() |
|
371 | lock.release() | |
372 |
|
372 | |||
|
373 | def syncpush(repo, remote): | |||
|
374 | """utility function to push bookmark to a remote | |||
|
375 | ||||
|
376 | Exist mostly to allow overridding for experimentation purpose""" | |||
|
377 | if (_enabled and repo.obsstore and | |||
|
378 | 'obsolete' in remote.listkeys('namespaces')): | |||
|
379 | rslts = [] | |||
|
380 | remotedata = repo.listkeys('obsolete') | |||
|
381 | for key in sorted(remotedata, reverse=True): | |||
|
382 | # reverse sort to ensure we end with dump0 | |||
|
383 | data = remotedata[key] | |||
|
384 | rslts.append(remote.pushkey('obsolete', key, '', data)) | |||
|
385 | if [r for r in rslts if not r]: | |||
|
386 | msg = _('failed to push some obsolete markers!\n') | |||
|
387 | repo.ui.warn(msg) | |||
|
388 | ||||
373 | def allmarkers(repo): |
|
389 | def allmarkers(repo): | |
374 | """all obsolete markers known in a repository""" |
|
390 | """all obsolete markers known in a repository""" | |
375 | for markerdata in repo.obsstore: |
|
391 | for markerdata in repo.obsstore: |
General Comments 0
You need to be logged in to leave comments.
Login now