public void TreeDiffTest1() { RepositoryGraph repo = new RepositoryGraph(repodir); var changes = repo.GetChanges("master"); foreach (var change in changes) { Console.WriteLine("{0}:{1}", change.ChangeType, change.Name); } }
public void TreeDiffTest() { RepositoryGraph repo = new RepositoryGraph(repodir); var changes = repo.GetChanges(Constants.MASTER, Constants.HEAD); foreach (var change in changes) { Console.WriteLine("{0}:{1}", change.ChangeType, change.Name); } }
public void TreeDiffTest1() { var git = Git.Open(@"D:\Users\Public\My Projects Tryout\gitsharp\").GetRepository(); RepositoryGraph repo = new RepositoryGraph(git); var changes = repo.GetChanges("master"); foreach (var change in changes) { Console.WriteLine("{0}:{1}", change.ChangeType, change.Name); } }
public RepositoryGraph Graph(GraphParameters parameters) { _parameters = parameters; var graph = new RepositoryGraph(); if (_repository == null) { return graph; } _contents = new GraphContents(); _repository.Commits .QueryBy(new Filter {SortBy = GitSortOptions.Topological | GitSortOptions.Time, Since = _repository.Refs}) .ForEach(AddCommit); AddTagAnnotations(); AddReferences(); AddUnreachableCommits(); // todo add notes? AddIndex(); graph.Set(_contents); return graph; }
public RepositoryGraph Graph(GraphParameters graphParameters) { var graph = new RepositoryGraph(); var commits = new GitVertex[] { new CommitVertex("c34173273", "Wrote some code") {Message = "This is a long form description of the commit"}, new CommitVertex("b1ae7a123", "Initial commit"), new CommitVertex("aa3823ca1", "Added readme"), new CommitVertex("9e21435fa", "Branching") {Message = "This is a long form description of the commit"}, new ReferenceVertex("refs/head/master", "c34173273"), new ReferenceVertex("remotes/origin/master", "c34173273"), }; graph.AddVertexRange(commits); graph.AddEdge(new GitEdge(commits[1], commits[2], null)); graph.AddEdge(new GitEdge(commits[0], commits[1], null)); graph.AddEdge(new GitEdge(commits[3], commits[2], null)); graph.LayoutAlgorithmType = "EfficientSugiyama"; return graph; }
public RepositoryGraph Graph() { var graph = new RepositoryGraph(); var commits = new[] { new CommitVertex("c34173273", "Wrote some code") {Description = "This is a long form description of the commit"}, new CommitVertex("b1ae7a123", "Initial commit"), new CommitVertex("aa3823ca1", "Added readme"), new CommitVertex("9e21435fa", "Branching") {Description = "This is a long form description of the commit"} }; commits.First().Branches.Merge(new BranchReference {Name = "Master"}); commits.First().Branches.Merge(new BranchReference {Name = "remotes/origin/master", IsRemote = true}); graph.AddVertexRange(commits); graph.AddEdge(new CommitEdge(commits[1], commits[2])); graph.AddEdge(new CommitEdge(commits[0], commits[1])); graph.AddEdge(new CommitEdge(commits[3], commits[2])); graph.LayoutAlgorithmType = "EfficientSugiyama"; return graph; }