예제 #1
0
파일: MergeTool.cs 프로젝트: Kuzq/gitter
 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) },
     };
 }
예제 #2
0
파일: TreeFile.cs 프로젝트: kiple/gitter
        public Task RunMergeToolAsync(MergeTool mergeTool, IProgress <OperationProgress> progress, CancellationToken cancellationToken)
        {
            Verify.State.IsFalse(ConflictType == ConflictType.None);

            return(RunMergeToolAsyncCore(mergeTool, progress, cancellationToken));
        }
예제 #3
0
파일: TreeFile.cs 프로젝트: kiple/gitter
        public void RunMergeTool(MergeTool mergeTool)
        {
            Verify.State.IsFalse(ConflictType == ConflictType.None);

            RunMergeToolCore(mergeTool);
        }
예제 #4
0
파일: TreeFile.cs 프로젝트: Kuzq/gitter
 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();
     }
 }
예제 #5
0
파일: TreeFile.cs 프로젝트: Kuzq/gitter
 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);
 }
예제 #6
0
파일: TreeFile.cs 프로젝트: Kuzq/gitter
        public Task RunMergeToolAsync(MergeTool mergeTool, IProgress<OperationProgress> progress, CancellationToken cancellationToken)
        {
            Verify.State.IsFalse(ConflictType == ConflictType.None);

            return RunMergeToolAsyncCore(mergeTool, progress, cancellationToken);
        }
예제 #7
0
파일: TreeFile.cs 프로젝트: Kuzq/gitter
        public void RunMergeTool(MergeTool mergeTool)
        {
            Verify.State.IsFalse(ConflictType == ConflictType.None);

            RunMergeToolCore(mergeTool);
        }
예제 #8
0
파일: MergeTool.cs 프로젝트: Kuzq/gitter
 public static MergeTool GetCreateByName(string name)
 {
     MergeTool res;
     if(!_tools.TryGetValue(name, out res))
     {
         res = new MergeTool(name);
     }
     return res;
 }