示例#1
0
        public Stream OpenBaseVersion(string fileName)
        {
            if (!SvnClientWrapper.IsInSourceControl(fileName))
            {
                return(null);
            }

            using (SvnClientWrapper client = new SvnClientWrapper())
                return(client.OpenBaseVersion(fileName));
        }
        public Task <Stream> OpenBaseVersionAsync(FileName fileName)
        {
            return(Task.Run(() => {
                if (!SvnClientWrapper.IsInSourceControl(fileName))
                {
                    return null;
                }

                using (SvnClientWrapper client = new SvnClientWrapper())
                    return client.OpenBaseVersion(fileName);
            }));
        }
示例#3
0
        public bool CanAttachTo(ICSharpCode.SharpDevelop.Gui.IViewContent content)
        {
            if (!AddInOptions.UseHistoryDisplayBinding)
            {
                return(false);
            }
            OpenedFile file = content.PrimaryFile;

            if (file == null || file.IsUntitled || !File.Exists(file.FileName))
            {
                return(false);
            }

            return(SvnClientWrapper.IsInSourceControl(file.FileName));
        }