Exemple #1
0
        void ProcessMissingObject(Package.ObjectMap o, ICollection <Package.ObjectMap> resolvedObjects)
        {
            var f = WorkingPath.GetChildFileWithName(o.FO.FilePath);

            if (!f.Exists)
            {
                return;
            }
            var status = new Status(o.FO.FilePath, StatusRepo)
            {
                Action     = RepoStatus.Packing,
                RealObject = GetObjectPathFromChecksum(o.FO)
            };
            var checksum = Repository.GetChecksum(f);

            this.Logger().Info("Found local previous version file for {0}. Compressing to {1}", o.FO.FilePath,
                               checksum);
            Repository.CompressObject(f, checksum);
            o.ExistingObject = checksum;
            resolvedObjects.Add(o);
            status.EndOutput();
        }
Exemple #2
0
        void ProcessMissingObjects(IDictionary <string, PackageMetaData> cache, string package, Package.ObjectMap missing)
        {
            var metadata = RetrieveMetaData(cache, package);

            if ((metadata == null) || !metadata.Files.ContainsKey(missing.FO.FilePath))
            {
                return;
            }

            var match = metadata.Files[missing.FO.FilePath];
            var oPath = Repository.GetObjectPath(match);

            if (oPath.Exists)
            {
                missing.ExistingObject = match;
            }
        }