private IEnumerable<HgChunk> BuildManifestBundleGroup(HgRepository hgRepository, HgRevset hgRevset) { var manifestRevset = new HgRevset(hgRepository.Manifest.Revlog.Entries.Where(hre => hgRevset.Contains(hre.LinkRevision))); var manifest = BuildBundleGroup(hgRepository, hgRepository.Manifest.Revlog, manifestRevset); return manifest; }
private HgBundleFile BuildBundleFile(HgRepository hgRepository, HgRevset hgRevset, string path) { // TODO: Do not bundle files without chunks log.Debug("bundling {0}", path); var hgPath = new HgPath(path); var hgFilelog = hgRepository.GetFilelog(hgPath); if(hgFilelog == null) return null; var filelogRevset = new HgRevset(hgFilelog.Revlog.Entries.Where(fre => hgRevset.Contains(fre.LinkRevision))); var hgBundleGroup = BuildBundleGroup(hgRepository, hgFilelog.Revlog, filelogRevset); var hgBundleFile = new HgBundleFile(hgPath, hgBundleGroup); return hgBundleFile; }