comparison mercurial/revlog.py @ 26705:2f5c45fe3a3b

revlog: rename bundle to cg to reflect its nature as a cg?unpacker The new convention is that bundles contain changegroups. bundle1 happens to *only* be a changegroup, but bundle2 is a more featureful container that isn't something you can pass to addgroup().
author Augie Fackler <augie@google.com>
date Wed, 14 Oct 2015 11:32:33 -0400
parents 56a640b0f656
children dfab6edb98e3 e240e914d226
comparison
equal deleted inserted replaced
26704:d7e614513413 26705:2f5c45fe3a3b
1440 ifh.write(entry) 1440 ifh.write(entry)
1441 ifh.write(data[0]) 1441 ifh.write(data[0])
1442 ifh.write(data[1]) 1442 ifh.write(data[1])
1443 self.checkinlinesize(transaction, ifh) 1443 self.checkinlinesize(transaction, ifh)
1444 1444
1445 def addgroup(self, bundle, linkmapper, transaction, addrevisioncb=None): 1445 def addgroup(self, cg, linkmapper, transaction, addrevisioncb=None):
1446 """ 1446 """
1447 add a delta group 1447 add a delta group
1448 1448
1449 given a set of deltas, add them to the revision log. the 1449 given a set of deltas, add them to the revision log. the
1450 first delta is against its parent, which should be in our 1450 first delta is against its parent, which should be in our
1477 ifh.flush() 1477 ifh.flush()
1478 try: 1478 try:
1479 # loop through our set of deltas 1479 # loop through our set of deltas
1480 chain = None 1480 chain = None
1481 while True: 1481 while True:
1482 chunkdata = bundle.deltachunk(chain) 1482 chunkdata = cg.deltachunk(chain)
1483 if not chunkdata: 1483 if not chunkdata:
1484 break 1484 break
1485 node = chunkdata['node'] 1485 node = chunkdata['node']
1486 p1 = chunkdata['p1'] 1486 p1 = chunkdata['p1']
1487 p2 = chunkdata['p2'] 1487 p2 = chunkdata['p2']