private void VerifyManifest(IDictionary<HgNodeID, IList<uint>> manifestLinkrevs, IDictionary<string, IDictionary<HgNodeID, UInt32>> fileNodeIDs)
        {
            var hgManifestReader = new HgManifestReader(repository.Encoder);

            foreach(var hgManifestEntry in repository.Manifest.Revlog.Entries)
            {
                var hgEntry = new HgRevlogReader(repository.Manifest.Revlog, fileSystem).ReadRevlogEntry(hgManifestEntry.Revision);
                var hgManifest = hgManifestReader.ReadManifestEntry(hgEntry);

                if(!manifestLinkrevs[hgManifestEntry.NodeID].Any())
                    throw new Exception(hgManifestEntry.NodeID.Short + " not in changesets");

                manifestLinkrevs.Remove(hgManifestEntry.NodeID);

                foreach(var hgManifestFileEntry in hgManifest.Files)
                {
                    fileNodeIDs[hgManifestFileEntry.Path.FullPath][hgManifestFileEntry.FilelogNodeID] = hgManifestEntry.LinkRevision;
                } // forach
            }
        }
Esempio n. 2
0
 public HgManifest(HgRevlog hgRevlog, HgRevlogReader revlogReader, HgEncoder hgEncoder) :
     base(hgRevlog, revlogReader)
 {
     this.hgEncoder = hgEncoder;
     hgManifestReader = new HgManifestReader(this.hgEncoder);
 }
Esempio n. 3
0
        public IEnumerable<HgManifestEntry> GetManifestEntries(HgRevset hgRevset)
        {
            var revlogReader = new HgRevlogReader(Manifest.Revlog, fileSystem);
            var entries = revlogReader.ReadRevlogEntries(hgRevset);

            var manifestEntries = new HgManifestReader(Encoder).ReadManifestEntries(entries);

            return manifestEntries.ToList();
        }