public SvnApiTest() { // works only if shadow copying in unit tests is disabled, because otherwise the relative path is wrong string repository = "file:///" + Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, @"..\..\..\..\test_repository")); api = new SharpSvnApi(repository); }
public void ShowLogMessage(ISvnApi svn) { try { MessageBox.Show(svn.GetLogMessage(Revision), "Log Message"); } catch (Exception x) { MessageBox.Show(Dump.ExceptionMessage(x), "Could not get log message", MessageBoxButton.OK, MessageBoxImage.Warning); } }
public Indexer(IndexerArgs args) { WriteLogo(); WriteArgs(); _args = args; _indexDirectory = FSDirectory.GetDirectory(args.IndexPath); _indexQueueLimit = new Semaphore(args.MaxThreads * 4, args.MaxThreads * 4); ThreadPool.SetMaxThreads(args.MaxThreads, 1000); ThreadPool.SetMinThreads(args.MaxThreads / 2, Environment.ProcessorCount); _contentField = new Field(FieldName.Content, _contentTokenStream); _pathField = new Field(FieldName.Path, _pathTokenStream); _externalsField = new Field(FieldName.Externals, _externalsTokenStream); _messageField = new Field(FieldName.Message, _messageTokenStream); _svn = new SharpSvnApi(args.RepositoryLocalUri, args.Credentials.User, args.Credentials.Password); }
public void ShowContent(ISvnApi svn) { if (Path[0] == '$') { ShowLogMessage(svn); return; } try { string path = GetTempPath(); IOFile.WriteAllText(path, svn.GetPathContent(Path, Revision, SizeInBytes)); Process.Start(Settings.Default.ViewWith, '"' + path + '"'); Thread.Sleep(500); // starting the viewer application could take a while, therefore we display the wait cursor for at least half a second } catch (Exception x) { MessageBox.Show(Dump.ExceptionMessage(x), "Could not open file", MessageBoxButton.OK, MessageBoxImage.Warning); } }
public SimpleHighlight(ISvnApi svn, int maxNumFragments, string separator, int fragmentSize) : base(svn) { this.maxNumFragments = maxNumFragments; this.separator = separator; this.fragmentSize = fragmentSize; }
public SimpleHighlight(ISvnApi svn, int maxNumFragments) : this(svn, maxNumFragments, SEPARATOR, FRAGMENT_SIZE) { }
public SimpleHighlight(ISvnApi svn, int maxNumFragments, string separator) : this(svn, maxNumFragments, separator, FRAGMENT_SIZE) { }
public SimpleHighlight(ISvnApi svn) : this(svn, NUM_FRAGMENTS, SEPARATOR, FRAGMENT_SIZE) { }
public Highlight(ISvnApi svn) { Svn = svn; }
public LineHighlight(ISvnApi svn, int maxNumFragments, int contextLines) : base(svn) { this.maxNumFragments = maxNumFragments; this.contextLines = contextLines; }
public LineHighlight(ISvnApi svn, int maxNumFragments) : this(svn, maxNumFragments, CONTEXT_LINES) { }
public LineHighlight(ISvnApi svn) : this(svn, NUM_FRAGMENTS, CONTEXT_LINES) { }