public override RevisionDescription[] GetHistory(string sourcefile, RevisionPtr since) { ArrayList revs = new ArrayList(); string curPath = Client.GetPathUrl(sourcefile); if (curPath == null) return null; SvnClient.Rev sincerev = SvnClient.Rev.First; if (since != null) sincerev = ((SvnRevisionPtr)since).ForApi(); foreach (SvnClient.LogEnt log in Client.Log(sourcefile, SvnClient.Rev.Head, sincerev)) { RevisionDescription d = new RevisionDescription(); d.Author = log.Author; d.Message = log.Message; d.Revision = new SvnRevisionPtr(log.Revision); d.RepositoryPath = curPath; d.Time = log.Time; revs.Add(d); // Be aware of the change in path resulting from a copy foreach (SvnClient.LogEntChangedPath chg in log.ChangedPaths) { if (curPath.EndsWith(chg.Path) && chg.CopyFromPath != null) { curPath = curPath.Substring(0, curPath.Length-chg.Path.Length) + chg.CopyFromPath; } } } return (RevisionDescription[])revs.ToArray(typeof(RevisionDescription)); }
public Worker(string name, string file, VersionControlSystem vc, object revPath, RevisionPtr revision) { this.name = name; this.file = file; this.vc = vc; this.revPath = revPath; this.revision = revision; }
public static void Show(string file, VersionControlSystem vc, object revPath, RevisionPtr revision) { new Worker(Path.GetFileName(file) + " " + revision.ToString(), file, vc, revPath, revision).Start(); }
public Worker(VersionControlSystem vc, string filepath, bool isDirectory, RevisionPtr since) { this.vc = vc; this.filepath = filepath; this.isDirectory = isDirectory; this.since = since; }
public static bool Show(string filepath, bool isDirectory, RevisionPtr since, bool test) { foreach (VersionControlSystem vc in VersionControlService.Providers) { if (vc.IsHistoryAvailable(filepath)) { if (test) return true; new Worker(vc, filepath, isDirectory, since).Start(); return true; } } return false; }
public abstract string GetTextAtRevision(object repositoryPath, RevisionPtr revision);
public abstract RevisionDescription[] GetHistory(string sourcefile, RevisionPtr since);
public override string GetTextAtRevision(object repositoryPath, RevisionPtr revision) { return Client.Cat(repositoryPath.ToString(), ((SvnRevisionPtr)revision).ForApi() ); }