Show More
@@ -517,6 +517,20 b' class cg3unpacker(cg2unpacker):' | |||||
517 | node, p1, p2, deltabase, cs, flags = headertuple |
|
517 | node, p1, p2, deltabase, cs, flags = headertuple | |
518 | return node, p1, p2, deltabase, cs, flags |
|
518 | return node, p1, p2, deltabase, cs, flags | |
519 |
|
519 | |||
|
520 | def _unpackmanifests(self, repo, revmap, trp, prog, numchanges): | |||
|
521 | super(cg3unpacker, self)._unpackmanifests(repo, revmap, trp, prog, | |||
|
522 | numchanges) | |||
|
523 | while True: | |||
|
524 | chunkdata = self.filelogheader() | |||
|
525 | if not chunkdata: | |||
|
526 | break | |||
|
527 | # If we get here, there are directory manifests in the changegroup | |||
|
528 | d = chunkdata["filename"] | |||
|
529 | repo.ui.debug("adding %s revisions\n" % d) | |||
|
530 | dirlog = repo.manifest.dirlog(d) | |||
|
531 | if not dirlog.addgroup(self, revmap, trp): | |||
|
532 | raise error.Abort(_("received dir revlog group is empty")) | |||
|
533 | ||||
520 | class headerlessfixup(object): |
|
534 | class headerlessfixup(object): | |
521 | def __init__(self, fh, h): |
|
535 | def __init__(self, fh, h): | |
522 | self._h = h |
|
536 | self._h = h | |
@@ -1055,32 +1069,22 b' def changegroup(repo, basenodes, source)' | |||||
1055 | def _addchangegroupfiles(repo, source, revmap, trp, pr, needfiles): |
|
1069 | def _addchangegroupfiles(repo, source, revmap, trp, pr, needfiles): | |
1056 | revisions = 0 |
|
1070 | revisions = 0 | |
1057 | files = 0 |
|
1071 | files = 0 | |
1058 | submfsdone = False |
|
|||
1059 | while True: |
|
1072 | while True: | |
1060 | chunkdata = source.filelogheader() |
|
1073 | chunkdata = source.filelogheader() | |
1061 | if not chunkdata: |
|
1074 | if not chunkdata: | |
1062 | if source.version == "03" and not submfsdone: |
|
|||
1063 | submfsdone = True |
|
|||
1064 | continue |
|
|||
1065 | break |
|
1075 | break | |
1066 | f = chunkdata["filename"] |
|
1076 | f = chunkdata["filename"] | |
1067 | repo.ui.debug("adding %s revisions\n" % f) |
|
1077 | repo.ui.debug("adding %s revisions\n" % f) | |
1068 | pr() |
|
1078 | pr() | |
1069 | directory = (f[-1] == '/') |
|
1079 | fl = repo.file(f) | |
1070 | if directory: |
|
|||
1071 | # a directory using treemanifests |
|
|||
1072 | fl = repo.manifest.dirlog(f) |
|
|||
1073 | else: |
|
|||
1074 | fl = repo.file(f) |
|
|||
1075 | o = len(fl) |
|
1080 | o = len(fl) | |
1076 | try: |
|
1081 | try: | |
1077 | if not fl.addgroup(source, revmap, trp): |
|
1082 | if not fl.addgroup(source, revmap, trp): | |
1078 | raise error.Abort(_("received file revlog group is empty")) |
|
1083 | raise error.Abort(_("received file revlog group is empty")) | |
1079 | except error.CensoredBaseError as e: |
|
1084 | except error.CensoredBaseError as e: | |
1080 | raise error.Abort(_("received delta base is censored: %s") % e) |
|
1085 | raise error.Abort(_("received delta base is censored: %s") % e) | |
1081 | if not directory: |
|
1086 | revisions += len(fl) - o | |
1082 | revisions += len(fl) - o |
|
1087 | files += 1 | |
1083 | files += 1 |
|
|||
1084 | if f in needfiles: |
|
1088 | if f in needfiles: | |
1085 | needs = needfiles[f] |
|
1089 | needs = needfiles[f] | |
1086 | for new in xrange(o, len(fl)): |
|
1090 | for new in xrange(o, len(fl)): |
General Comments 0
You need to be logged in to leave comments.
Login now