Browse Source

Add git sync

pull/66/head
Linquize 12 years ago
parent
commit
caf8233812
  1. 4
      data/resources/StringResources.resx
  2. 4
      src/AddIns/VersionControl/GitAddIn/GitAddIn.addin
  3. 8
      src/AddIns/VersionControl/GitAddIn/Src/Commands.cs
  4. 5
      src/AddIns/VersionControl/GitAddIn/Src/GitGuiWrapper.cs

4
data/resources/StringResources.resx

@ -403,6 +403,10 @@ They will stop working after removing this AddIn! Are you sure you want to conti @@ -403,6 +403,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>

4
src/AddIns/VersionControl/GitAddIn/GitAddIn.addin

@ -41,6 +41,10 @@ @@ -41,6 +41,10 @@
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"/>

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

@ -101,6 +101,14 @@ namespace ICSharpCode.GitAddIn @@ -101,6 +101,14 @@ namespace ICSharpCode.GitAddIn
}
}
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)

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

@ -101,6 +101,11 @@ namespace ICSharpCode.GitAddIn @@ -101,6 +101,11 @@ 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);

Loading…
Cancel
Save