Browse Source

Merge caf8233812 into ba372efbff

pull/66/merge
linquize 8 years ago committed by GitHub
parent
commit
4f50d19819
  1. 4
      data/resources/StringResources.resx
  2. 12
      src/AddIns/VersionControl/GitAddIn/GitAddIn.addin
  3. 24
      src/AddIns/VersionControl/GitAddIn/Src/Commands.cs
  4. 15
      src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs

4
data/resources/StringResources.resx

@ -409,6 +409,10 @@ They will stop working after removing this AddIn! Are you sure you want to conti @@ -409,6 +409,10 @@ They will stop working after removing this AddIn! Are you sure you want to conti
<data name="AddIns.ClassDiagram.ShowClassDiagram" xml:space="preserve">
<value>Show Class Diagram</value>
</data>
<data name="AddIns.Git.Sync" xml:space="preserve">
<value>Sync</value>
<comment>Synchronize changes with remote repository</comment>
</data>
<data name="AddIns.Git.TortoiseGitRequired" xml:space="preserve">
<value>TortoiseGit needs to be installed to execute this action.</value>
<comment>Error message when executing git command but TortoiseGit cannot be found</comment>

12
src/AddIns/VersionControl/GitAddIn/GitAddIn.addin

@ -40,6 +40,18 @@ @@ -40,6 +40,18 @@
<MenuItem id = "GitLog"
label = "Git ${res:AddIns.Subversion.ShowLog}..."
class = "ICSharpCode.GitAddIn.GitLogCommand"/>
<MenuItem id = "GitSync"
label = "Git ${res:AddIns.Git.Sync}..."
class = "ICSharpCode.GitAddIn.GitSyncCommand"/>
<MenuItem id = "GitBlame"
label = "Git ${res:AddIns.Subversion.Blame}..."
class = "ICSharpCode.GitAddIn.GitBlameCommand"/>
<MenuItem id = "GitSettings"
label = "Git ${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SettingsGroupBox}"
class = "ICSharpCode.GitAddIn.GitSettingsCommand"/>
</Condition>
</Path>

24
src/AddIns/VersionControl/GitAddIn/Src/Commands.cs

@ -116,4 +116,28 @@ namespace ICSharpCode.GitAddIn @@ -116,4 +116,28 @@ namespace ICSharpCode.GitAddIn
GitGuiWrapper.Log(filename, callback);
}
}
public class GitSyncCommand : GitCommand
{
protected override void Run(string filename, Action callback)
{
GitGuiWrapper.Sync(filename, callback);
}
}
public class GitBlameCommand : GitCommand
{
protected override void Run(string filename, Action callback)
{
GitGuiWrapper.Blame(filename, callback);
}
}
public class GitSettingsCommand : GitCommand
{
protected override void Run(string filename, Action callback)
{
GitGuiWrapper.ShowGitSettings(filename, callback);
}
}
}

15
src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs

@ -119,5 +119,20 @@ namespace ICSharpCode.GitAddIn @@ -119,5 +119,20 @@ namespace ICSharpCode.GitAddIn
{
Proc("log", fileName, callback);
}
public static void Sync(string fileName, Action callback)
{
Proc("sync", fileName, callback);
}
public static void Blame(string fileName, Action callback)
{
Proc("blame", fileName, callback);
}
public static void ShowGitSettings(string fileName, Action callback)
{
Proc("settings", fileName, callback);
}
}
}

Loading…
Cancel
Save