mercurial/changegroup.py
changeset 45371 e58e234096de
parent 45144 c93dd9d9f1e6
child 45372 77b8588dd84e
equal deleted inserted replaced
45370:15d35f2ba474 45371:e58e234096de
   947 
   947 
   948         # Treemanifests don't work correctly with fastpathlinkrev
   948         # Treemanifests don't work correctly with fastpathlinkrev
   949         # either, because we don't discover which directory nodes to
   949         # either, because we don't discover which directory nodes to
   950         # send along with files. This could probably be fixed.
   950         # send along with files. This could probably be fixed.
   951         fastpathlinkrev = fastpathlinkrev and (
   951         fastpathlinkrev = fastpathlinkrev and (
   952             b'treemanifest' not in repo.requirements
   952             repository.TREEMANIFEST_REQUIREMENT not in repo.requirements
   953         )
   953         )
   954 
   954 
   955         fnodes = {}  # needed file nodes
   955         fnodes = {}  # needed file nodes
   956 
   956 
   957         size = 0
   957         size = 0
  1465     versions = set(_packermap.keys())
  1465     versions = set(_packermap.keys())
  1466     needv03 = False
  1466     needv03 = False
  1467     if (
  1467     if (
  1468         repo.ui.configbool(b'experimental', b'changegroup3')
  1468         repo.ui.configbool(b'experimental', b'changegroup3')
  1469         or repo.ui.configbool(b'experimental', b'treemanifest')
  1469         or repo.ui.configbool(b'experimental', b'treemanifest')
  1470         or b'treemanifest' in repo.requirements
  1470         or repository.TREEMANIFEST_REQUIREMENT in repo.requirements
  1471     ):
  1471     ):
  1472         # we keep version 03 because we need to to exchange treemanifest data
  1472         # we keep version 03 because we need to to exchange treemanifest data
  1473         #
  1473         #
  1474         # we also keep vresion 01 and 02, because it is possible for repo to
  1474         # we also keep vresion 01 and 02, because it is possible for repo to
  1475         # contains both normal and tree manifest at the same time. so using
  1475         # contains both normal and tree manifest at the same time. so using
  1493 
  1493 
  1494 
  1494 
  1495 # Changegroup versions that can be created from the repo
  1495 # Changegroup versions that can be created from the repo
  1496 def supportedoutgoingversions(repo):
  1496 def supportedoutgoingversions(repo):
  1497     versions = allsupportedversions(repo)
  1497     versions = allsupportedversions(repo)
  1498     if b'treemanifest' in repo.requirements:
  1498     if repository.TREEMANIFEST_REQUIREMENT in repo.requirements:
  1499         # Versions 01 and 02 support only flat manifests and it's just too
  1499         # Versions 01 and 02 support only flat manifests and it's just too
  1500         # expensive to convert between the flat manifest and tree manifest on
  1500         # expensive to convert between the flat manifest and tree manifest on
  1501         # the fly. Since tree manifests are hashed differently, all of history
  1501         # the fly. Since tree manifests are hashed differently, all of history
  1502         # would have to be converted. Instead, we simply don't even pretend to
  1502         # would have to be converted. Instead, we simply don't even pretend to
  1503         # support versions 01 and 02.
  1503         # support versions 01 and 02.