Ejemplo n.º 1
0
 public IBlame Blame(string revision, string filePath)
 {
     using (var blame = svn.Blame(revision, filePath))
     {
         return(SvnBlame.Parse(blame));
     }
 }
Ejemplo n.º 2
0
        public void Should_keep_revision_for_each_line()
        {
            blame = SvnBlame.Parse(blame1.ToStream());

            blame[1]
            .Should().Be("357");
            blame[2]
            .Should().Be("1000");
            blame[7]
            .Should().Be("2843");
        }
Ejemplo n.º 3
0
        public static SvnBlame Parse(Stream blameData)
        {
            TextReader reader     = new StreamReader(blameData);
            int        lineNumber = 1;
            SvnBlame   blame      = new SvnBlame();
            string     line;

            while ((line = reader.ReadLine()) != null)
            {
                if (line != string.Empty)
                {
                    blame.Add(
                        lineNumber,
                        line.Split(blameSeparators, StringSplitOptions.RemoveEmptyEntries)[0]
                        );
                }
                lineNumber++;
            }

            return(blame);
        }