Ejemplo n.º 1
0
        private void getRevisions(string baseSha, string headSha,
                                  out IEnumerable <FileRevision> baseRevisions, out IEnumerable <FileRevision> headRevisions)
        {
            GitLabSharp.Entities.Comparison comparison = _fileStorage.ComparisonCache.LoadComparison(baseSha, headSha);
            if (comparison == null)
            {
                Trace.TraceWarning(String.Format(
                                       "[FileStorageDiffCache] Cannot find a Comparison object. BaseSHA={0}, HeadSHA={1}", baseSha, headSha));
                baseRevisions = null;
                headRevisions = null;
                return;
            }

            baseRevisions = FileStorageUtils.TransformDiffs <FileRevision>(comparison.Diffs, baseSha, true);
            headRevisions = FileStorageUtils.TransformDiffs <FileRevision>(comparison.Diffs, headSha, false);
        }
Ejemplo n.º 2
0
 private IEnumerable <FileInternal> convertDiffToFiles(IEnumerable <DiffStruct> diffs, string sha, bool old)
 {
     return(FileStorageUtils.TransformDiffs <FileInternal>(diffs, sha, old));
 }