mercurial/exchange.py
changeset 25118 e632a2429982
parent 24878 e530cde6d115
child 25149 3f0744eeaeaf
equal deleted inserted replaced
25117:b5c8ee72debc 25118:e632a2429982
   534     remoteversions = bundle2.obsmarkersversion(bundler.capabilities)
   534     remoteversions = bundle2.obsmarkersversion(bundler.capabilities)
   535     if obsolete.commonversion(remoteversions) is None:
   535     if obsolete.commonversion(remoteversions) is None:
   536         return
   536         return
   537     pushop.stepsdone.add('obsmarkers')
   537     pushop.stepsdone.add('obsmarkers')
   538     if pushop.outobsmarkers:
   538     if pushop.outobsmarkers:
   539         buildobsmarkerspart(bundler, pushop.outobsmarkers)
   539         markers = sorted(pushop.outobsmarkers)
       
   540         buildobsmarkerspart(bundler, markers)
   540 
   541 
   541 @b2partsgenerator('bookmarks')
   542 @b2partsgenerator('bookmarks')
   542 def _pushb2bookmarks(pushop, bundler):
   543 def _pushb2bookmarks(pushop, bundler):
   543     """handle phase push through bundle2"""
   544     """handle phase push through bundle2"""
   544     if 'bookmarks' in pushop.stepsdone:
   545     if 'bookmarks' in pushop.stepsdone:
   749     repo = pushop.repo
   750     repo = pushop.repo
   750     remote = pushop.remote
   751     remote = pushop.remote
   751     pushop.stepsdone.add('obsmarkers')
   752     pushop.stepsdone.add('obsmarkers')
   752     if pushop.outobsmarkers:
   753     if pushop.outobsmarkers:
   753         rslts = []
   754         rslts = []
   754         remotedata = obsolete._pushkeyescape(pushop.outobsmarkers)
   755         remotedata = obsolete._pushkeyescape(sorted(pushop.outobsmarkers))
   755         for key in sorted(remotedata, reverse=True):
   756         for key in sorted(remotedata, reverse=True):
   756             # reverse sort to ensure we end with dump0
   757             # reverse sort to ensure we end with dump0
   757             data = remotedata[key]
   758             data = remotedata[key]
   758             rslts.append(remote.pushkey('obsolete', key, '', data))
   759             rslts.append(remote.pushkey('obsolete', key, '', data))
   759         if [r for r in rslts if not r]:
   760         if [r for r in rslts if not r]:
  1255     if kwargs.get('obsmarkers', False):
  1256     if kwargs.get('obsmarkers', False):
  1256         if heads is None:
  1257         if heads is None:
  1257             heads = repo.heads()
  1258             heads = repo.heads()
  1258         subset = [c.node() for c in repo.set('::%ln', heads)]
  1259         subset = [c.node() for c in repo.set('::%ln', heads)]
  1259         markers = repo.obsstore.relevantmarkers(subset)
  1260         markers = repo.obsstore.relevantmarkers(subset)
       
  1261         markers = sorted(markers)
  1260         buildobsmarkerspart(bundler, markers)
  1262         buildobsmarkerspart(bundler, markers)
  1261 
  1263 
  1262 def check_heads(repo, their_heads, context):
  1264 def check_heads(repo, their_heads, context):
  1263     """check if the heads of a repo have been modified
  1265     """check if the heads of a repo have been modified
  1264 
  1266