public async Task <Stream> OpenBaseVersionAsync(FileName fileName) { if (!Git.IsInWorkingCopy(fileName)) { return(null); } string git = Git.FindGit(); if (git == null) { return(null); } return(OpenOutput(git, fileName, await GetBlobHashAsync(git, fileName).ConfigureAwait(false))); }
public Stream OpenBaseVersion(string fileName) { if (!Git.IsInWorkingCopy(fileName)) { return(null); } string git = Git.FindGit(); if (git == null) { return(null); } return(OpenOutput(git, fileName, GetBlobHash(git, fileName))); }
public IDisposable WatchBaseVersionChanges(FileName fileName, EventHandler callback) { if (!File.Exists(fileName)) { return(null); } if (!Git.IsInWorkingCopy(fileName)) { return(null); } string git = Git.FindGit(); if (git == null) { return(null); } return(new BaseVersionChangeWatcher(fileName, GetBlobHashAsync(git, fileName).Result, callback)); }
public bool IsValid(object caller, Condition condition) { FileNode node = ProjectBrowserPad.Instance.SelectedNode as FileNode; if (node != null) { return(Git.IsInWorkingCopy(node.FileName)); } DirectoryNode dir = ProjectBrowserPad.Instance.SelectedNode as DirectoryNode; if (dir != null) { return(Git.IsInWorkingCopy(dir.Directory)); } SolutionNode sol = ProjectBrowserPad.Instance.SelectedNode as SolutionNode; if (sol != null) { return(Git.IsInWorkingCopy(sol.Solution.Directory)); } return(false); }