public HgRollupFileDiffInfo(HgPath file, bool isBinary, HgUnifiedDiff diff, int additions, int removals)
 {
     File = file;
     Diff = diff;
     IsBinary = isBinary;
     Additions = additions;
     Removals = removals;
 }
Esempio n. 2
0
        private HgRollupFileDiffInfo GetHgRollupFileDiffInfo(HgPath hgPath, bool isBinary, HgUnifiedDiff hgUnifiedDiff)
        {
            var additions = hgUnifiedDiff == null ? 0 : hgUnifiedDiff.Hunks.SelectMany(h => h.Lines).Count(l => l.Added);
            var removals = hgUnifiedDiff == null ? 0 : hgUnifiedDiff.Hunks.SelectMany(h => h.Lines).Count(l => l.Removed);

            return new HgRollupFileDiffInfo(hgPath, isBinary, hgUnifiedDiff, additions, removals);
        }