comparison mercurial/changegroup.py @ 23168:a92ba36a1a9d

changegroup: add a "packermap" dictionary to track different packer versions We only have "01" right now, but we should get general delta in soon. Bundle2 is expected to make use of this to advertise and select the right packer to use on both sides.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 24 Sep 2014 21:24:06 -0700
parents 3fe571c74b27
children 706547a14b8b
comparison
equal deleted inserted replaced
23166:30e0dcd7c5ff 23168:a92ba36a1a9d
430 yield meta 430 yield meta
431 yield delta 431 yield delta
432 def builddeltaheader(self, node, p1n, p2n, basenode, linknode): 432 def builddeltaheader(self, node, p1n, p2n, basenode, linknode):
433 # do nothing with basenode, it is implicitly the previous one in HG10 433 # do nothing with basenode, it is implicitly the previous one in HG10
434 return struct.pack(self.deltaheader, node, p1n, p2n, linknode) 434 return struct.pack(self.deltaheader, node, p1n, p2n, linknode)
435
436 packermap = {'01': (cg1packer, cg1unpacker)}
435 437
436 def _changegroupinfo(repo, nodes, source): 438 def _changegroupinfo(repo, nodes, source):
437 if repo.ui.verbose or source == 'bundle': 439 if repo.ui.verbose or source == 'bundle':
438 repo.ui.status(_("%d changesets found\n") % len(nodes)) 440 repo.ui.status(_("%d changesets found\n") % len(nodes))
439 if repo.ui.debugflag: 441 if repo.ui.debugflag: