Mercurial > public > mercurial-scm > hg
comparison mercurial/exchange.py @ 22036:f1528ef123f4
push: use stepsdone for obsmarkers push
We do not have infrastructure to include obsolescence markers in the bundle2
push from core. But extensions may so we make sure it would not be sent twice.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 31 Jul 2014 13:51:17 -0700 |
parents | 24bb01f42e82 |
children | e894de232f35 |
comparison
equal
deleted
inserted
replaced
22035:24bb01f42e82 | 22036:f1528ef123f4 |
---|---|
588 pushop.ui.status(_('cannot lock source repo, skipping ' | 588 pushop.ui.status(_('cannot lock source repo, skipping ' |
589 'local %s phase update\n') % phasestr) | 589 'local %s phase update\n') % phasestr) |
590 | 590 |
591 def _pushobsolete(pushop): | 591 def _pushobsolete(pushop): |
592 """utility function to push obsolete markers to a remote""" | 592 """utility function to push obsolete markers to a remote""" |
593 if 'obsmarkers' in pushop.stepsdone: | |
594 return | |
593 pushop.ui.debug('try to push obsolete markers to remote\n') | 595 pushop.ui.debug('try to push obsolete markers to remote\n') |
594 repo = pushop.repo | 596 repo = pushop.repo |
595 remote = pushop.remote | 597 remote = pushop.remote |
598 pushop.stepsdone.add('obsmarkers') | |
596 if (obsolete._enabled and repo.obsstore and | 599 if (obsolete._enabled and repo.obsstore and |
597 'obsolete' in remote.listkeys('namespaces')): | 600 'obsolete' in remote.listkeys('namespaces')): |
598 rslts = [] | 601 rslts = [] |
599 remotedata = obsolete._pushkeyescape(pushop.outobsmarkers) | 602 remotedata = obsolete._pushkeyescape(pushop.outobsmarkers) |
600 for key in sorted(remotedata, reverse=True): | 603 for key in sorted(remotedata, reverse=True): |