1053 raise error.Abort( |
1053 raise error.Abort( |
1054 _('missing file data for %s:%s - run hg verify') % |
1054 _('missing file data for %s:%s - run hg verify') % |
1055 (f, hex(n))) |
1055 (f, hex(n))) |
1056 |
1056 |
1057 return revisions, files |
1057 return revisions, files |
|
1058 |
|
1059 def _packellipsischangegroup(repo, common, match, relevant_nodes, |
|
1060 ellipsisroots, visitnodes, depth, source, version): |
|
1061 if version in ('01', '02'): |
|
1062 raise error.Abort( |
|
1063 'ellipsis nodes require at least cg3 on client and server, ' |
|
1064 'but negotiated version %s' % version) |
|
1065 # We wrap cg1packer.revchunk, using a side channel to pass |
|
1066 # relevant_nodes into that area. Then if linknode isn't in the |
|
1067 # set, we know we have an ellipsis node and we should defer |
|
1068 # sending that node's data. We override close() to detect |
|
1069 # pending ellipsis nodes and flush them. |
|
1070 packer = getbundler(version, repo, filematcher=match) |
|
1071 # Give the packer the list of nodes which should not be |
|
1072 # ellipsis nodes. We store this rather than the set of nodes |
|
1073 # that should be an ellipsis because for very large histories |
|
1074 # we expect this to be significantly smaller. |
|
1075 packer.full_nodes = relevant_nodes |
|
1076 # Maps ellipsis revs to their roots at the changelog level. |
|
1077 packer.precomputed_ellipsis = ellipsisroots |
|
1078 # Maps CL revs to per-revlog revisions. Cleared in close() at |
|
1079 # the end of each group. |
|
1080 packer.clrev_to_localrev = {} |
|
1081 packer.next_clrev_to_localrev = {} |
|
1082 # Maps changelog nodes to changelog revs. Filled in once |
|
1083 # during changelog stage and then left unmodified. |
|
1084 packer.clnode_to_rev = {} |
|
1085 packer.changelog_done = False |
|
1086 # If true, informs the packer that it is serving shallow content and might |
|
1087 # need to pack file contents not introduced by the changes being packed. |
|
1088 packer.is_shallow = depth is not None |
|
1089 |
|
1090 return packer.generate(common, visitnodes, False, source) |