mercurial/exchange.py
changeset 32291 bd872f64a8ba
parent 32287 df3cf9422e1b
child 32515 e70d6dbde713
equal deleted inserted replaced
32290:2959c3e986e0 32291:bd872f64a8ba
    41                          'packed1': 's1',
    41                          'packed1': 's1',
    42                          'bundle2': '02', #legacy
    42                          'bundle2': '02', #legacy
    43                         }
    43                         }
    44 
    44 
    45 # Compression engines allowed in version 1. THIS SHOULD NEVER CHANGE.
    45 # Compression engines allowed in version 1. THIS SHOULD NEVER CHANGE.
    46 _bundlespecv1compengines = set(['gzip', 'bzip2', 'none'])
    46 _bundlespecv1compengines = {'gzip', 'bzip2', 'none'}
    47 
    47 
    48 def parsebundlespec(repo, spec, strict=True, externalnames=False):
    48 def parsebundlespec(repo, spec, strict=True, externalnames=False):
    49     """Parse a bundle string specification into parts.
    49     """Parse a bundle string specification into parts.
    50 
    50 
    51     Bundle specifications denote a well-defined bundle/exchange format.
    51     Bundle specifications denote a well-defined bundle/exchange format.
  1520             pullop.repo.invalidatevolatilesets()
  1520             pullop.repo.invalidatevolatilesets()
  1521     return tr
  1521     return tr
  1522 
  1522 
  1523 def caps20to10(repo):
  1523 def caps20to10(repo):
  1524     """return a set with appropriate options to use bundle20 during getbundle"""
  1524     """return a set with appropriate options to use bundle20 during getbundle"""
  1525     caps = set(['HG20'])
  1525     caps = {'HG20'}
  1526     capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo))
  1526     capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo))
  1527     caps.add('bundle2=' + urlreq.quote(capsblob))
  1527     caps.add('bundle2=' + urlreq.quote(capsblob))
  1528     return caps
  1528     return caps
  1529 
  1529 
  1530 # List of names of steps to perform for a bundle2 for getbundle, order matters.
  1530 # List of names of steps to perform for a bundle2 for getbundle, order matters.