-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature request. git svn support #45
- Loading branch information
Showing
17 changed files
with
161 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using SamirBoulema.TGit.Helpers; | ||
using System; | ||
using Microsoft.VisualStudio.Shell; | ||
using EnvDTE; | ||
|
||
namespace SamirBoulema.TGit.Commands | ||
{ | ||
public class GitSVNMenuCommands | ||
{ | ||
private readonly OptionPageGrid _options; | ||
private readonly OleMenuCommandService _mcs; | ||
private readonly DTE _dte; | ||
private readonly EnvHelper _envHelper; | ||
|
||
public GitSVNMenuCommands(OleMenuCommandService mcs, DTE dte, | ||
OptionPageGrid options, EnvHelper envHelper) | ||
{ | ||
_mcs = mcs; | ||
_options = options; | ||
_dte = dte; | ||
_envHelper = envHelper; | ||
} | ||
|
||
public void AddCommands() | ||
{ | ||
CommandHelper.AddCommand(_mcs, SvnDCommitCommand, PkgCmdIDList.SvnDCommit); | ||
CommandHelper.AddCommand(_mcs, SvnFetchCommand, PkgCmdIDList.SvnFetch); | ||
CommandHelper.AddCommand(_mcs, SvnRebaseCommand, PkgCmdIDList.SvnRebase); | ||
} | ||
|
||
private void SvnDCommitCommand(object sender, EventArgs e) | ||
{ | ||
FileHelper.SaveAllFiles(_dte); | ||
ProcessHelper.StartTortoiseGitProc(_envHelper, $"/command:svndcommit /path:\"{_envHelper.GetSolutionDir()}\" /closeonend:{_options.CloseOnEnd}"); | ||
} | ||
|
||
private void SvnFetchCommand(object sender, EventArgs e) | ||
{ | ||
FileHelper.SaveAllFiles(_dte); | ||
ProcessHelper.StartTortoiseGitProc(_envHelper, $"/command:svnrebase /path:\"{_envHelper.GetSolutionDir()}\" /closeonend:{_options.CloseOnEnd}"); | ||
} | ||
|
||
private void SvnRebaseCommand(object sender, EventArgs e) | ||
{ | ||
FileHelper.SaveAllFiles(_dte); | ||
ProcessHelper.StartTortoiseGitProc(_envHelper, $"/command:svnfetch /path:\"{_envHelper.GetSolutionDir()}\" /closeonend:{_options.CloseOnEnd}"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<Rectangle Width="16" Height="16"> | ||
<Rectangle.Fill> | ||
<DrawingBrush Stretch="None"> | ||
<DrawingBrush.Drawing> | ||
<DrawingGroup> | ||
<GeometryDrawing Brush="#FF000000" Geometry="F0 M12,16z M0,0z M11,11.28L11,5C10.97,4.22 10.66,3.53 10.06,2.94 9.46,2.35 8.78,2.03 8,2L7,2 7,0 4,3 7,6 7,4 8,4C8.27,4.02 8.48,4.11 8.69,4.31 8.9,4.51 8.99,4.73 9,5L9,11.28A1.993,1.993,0,0,0,10,15A1.993,1.993,0,0,0,11,11.28z M10,14.2C9.34,14.2 8.8,13.65 8.8,13 8.8,12.35 9.35,11.8 10,11.8 10.65,11.8 11.2,12.35 11.2,13 11.2,13.65 10.65,14.2 10,14.2z M4,3C4,1.89,3.11,1,2,1A1.993,1.993,0,0,0,1,4.72L1,11.28A1.993,1.993,0,0,0,2,15A1.993,1.993,0,0,0,3,11.28L3,4.72C3.59,4.38,4,3.74,4,3z M3.2,13C3.2,13.66 2.65,14.2 2,14.2 1.35,14.2 0.8,13.65 0.8,13 0.8,12.35 1.35,11.8 2,11.8 2.65,11.8 3.2,12.35 3.2,13z M2,4.2C1.34,4.2 0.8,3.65 0.8,3 0.8,2.35 1.35,1.8 2,1.8 2.65,1.8 3.2,2.35 3.2,3 3.2,3.65 2.65,4.2 2,4.2z" /> | ||
</DrawingGroup> | ||
</DrawingBrush.Drawing> | ||
</DrawingBrush> | ||
</Rectangle.Fill> | ||
</Rectangle> | ||
</Viewbox> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: 4.8.{build} | ||
version: 4.9.{build} | ||
skip_tags: true | ||
|
||
image: Visual Studio 2017 | ||
|