Mercurial > hg-stable
diff mercurial/revlog.py @ 12335:e21fe9c5fb25
bundle: get rid of chunkiter
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 19 Sep 2010 12:51:54 -0500 |
parents | 2315a95ee887 |
children | 9d234f7d8a77 |
line wrap: on
line diff
--- a/mercurial/revlog.py Sun Sep 19 12:38:44 2010 -0500 +++ b/mercurial/revlog.py Sun Sep 19 12:51:54 2010 -0500 @@ -1269,7 +1269,7 @@ yield changegroup.closechunk() - def addgroup(self, revs, linkmapper, transaction): + def addgroup(self, bundle, linkmapper, transaction): """ add a delta group @@ -1301,7 +1301,10 @@ try: # loop through our set of deltas chain = None - for chunk in revs: + while 1: + chunk = bundle.chunk() + if not chunk: + break node, p1, p2, cs = struct.unpack("20s20s20s20s", chunk[:80]) link = linkmapper(cs) if (node in self.nodemap and