static MergeTool() { _tools = new Dictionary<string, MergeTool>(13) { { "kdiff3", kdiff3 = new MergeTool("kdiff3", @"http://sourceforge.net/projects/kdiff3/files/", true, true) }, { "tkdiff", tkdiff = new MergeTool("tkdiff", @"http://sourceforge.net/projects/tkdiff/files/", true, true) }, { "meld", meld = new MergeTool("meld", @"http://ftp.gnome.org/pub/gnome/sources/meld/", false, true) }, { "xxdiff", xxdiff = new MergeTool("xxdiff", @"http://sourceforge.net/projects/xxdiff/files/", false, true) }, { "emerge", emerge = new MergeTool("emerge", @"", false, true) }, { "vimdiff", vimdiff = new MergeTool("vimdiff", @"", false, true) }, { "gvimdiff", gvimdiff = new MergeTool("gvimdiff", @"", false, true) }, { "ecmerge", ecmerge = new MergeTool("ecmerge", @"http://www.elliecomputing.com/Download/download_form.asp", true, true) }, { "diffuse", diffuse = new MergeTool("diffuse", @"http://diffuse.sourceforge.net/download.html", true, true) }, { "tortoisemerge", tortoisemerge = new MergeTool("tortoisemerge", @"http://tortoisesvn.net/downloads", true, false) }, { "opendiff", opendiff = new MergeTool("opendiff", @"", false, true) }, { "p4merge", p4merge = new MergeTool("p4merge", @"http://www.perforce.com/perforce/downloads/index.html", true, true) }, { "araxis", araxis = new MergeTool("araxis", @"http://www.araxis.com/merge/index.html", true, false) }, }; }
public Task RunMergeToolAsync(MergeTool mergeTool, IProgress <OperationProgress> progress, CancellationToken cancellationToken) { Verify.State.IsFalse(ConflictType == ConflictType.None); return(RunMergeToolAsyncCore(mergeTool, progress, cancellationToken)); }
public void RunMergeTool(MergeTool mergeTool) { Verify.State.IsFalse(ConflictType == ConflictType.None); RunMergeToolCore(mergeTool); }
private void RunMergeToolCore(MergeTool mergeTool) { try { using(Repository.Monitor.BlockNotifications( RepositoryNotifications.IndexUpdated, RepositoryNotifications.WorktreeUpdated)) { Repository.Accessor.RunMergeTool.Invoke( new RunMergeToolParameters(RelativePath) { Tool = mergeTool == null ? null : mergeTool.Name, }); } } finally { Repository.Status.Refresh(); } }
private Task RunMergeToolAsyncCore(MergeTool mergeTool, IProgress<OperationProgress> progress, CancellationToken cancellationToken) { if(progress != null) { progress.Report(new OperationProgress(Resources.StrWaitingMergeTool.AddEllipsis())); } var blockedNotifications = Repository.Monitor.BlockNotifications( RepositoryNotifications.IndexUpdated, RepositoryNotifications.WorktreeUpdated); return Repository.Accessor .RunMergeTool.InvokeAsync( new RunMergeToolParameters(RelativePath) { Tool = mergeTool == null ? null : mergeTool.Name, }, progress, cancellationToken) .ContinueWith( t => { blockedNotifications.Dispose(); Repository.Status.Refresh(); }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default); }
public Task RunMergeToolAsync(MergeTool mergeTool, IProgress<OperationProgress> progress, CancellationToken cancellationToken) { Verify.State.IsFalse(ConflictType == ConflictType.None); return RunMergeToolAsyncCore(mergeTool, progress, cancellationToken); }
public void RunMergeTool(MergeTool mergeTool) { Verify.State.IsFalse(ConflictType == ConflictType.None); RunMergeToolCore(mergeTool); }
public static MergeTool GetCreateByName(string name) { MergeTool res; if(!_tools.TryGetValue(name, out res)) { res = new MergeTool(name); } return res; }