mercurial/bundle2.py
changeset 22344 9829b7948100
parent 22343 76677a2c1cfd
child 22390 e2806b8613ca
equal deleted inserted replaced
22343:76677a2c1cfd 22344:9829b7948100
   144 
   144 
   145 import util
   145 import util
   146 import struct
   146 import struct
   147 import urllib
   147 import urllib
   148 import string
   148 import string
       
   149 import obsolete
   149 import pushkey
   150 import pushkey
   150 
   151 
   151 import changegroup, error
   152 import changegroup, error
   152 from i18n import _
   153 from i18n import _
   153 
   154 
   798     if not raw and raw != '':
   799     if not raw and raw != '':
   799         return {}
   800         return {}
   800     capsblob = urllib.unquote(remote.capable('bundle2-exp'))
   801     capsblob = urllib.unquote(remote.capable('bundle2-exp'))
   801     return decodecaps(capsblob)
   802     return decodecaps(capsblob)
   802 
   803 
       
   804 def obsmarkersversion(caps):
       
   805     """extract the list of supported obsmarkers versions from a bundle2caps dict
       
   806     """
       
   807     obscaps = caps.get('b2x:obsmarkers', ())
       
   808     return [int(c[1:]) for c in obscaps if c.startswith('V')]
       
   809 
   803 @parthandler('b2x:changegroup')
   810 @parthandler('b2x:changegroup')
   804 def handlechangegroup(op, inpart):
   811 def handlechangegroup(op, inpart):
   805     """apply a changegroup part on the repo
   812     """apply a changegroup part on the repo
   806 
   813 
   807     This is a very early implementation that will massive rework before being
   814     This is a very early implementation that will massive rework before being