Skip to content

Commit

Permalink
Abort merge option #41
Browse files Browse the repository at this point in the history
  • Loading branch information
sboulema committed Apr 18, 2018
1 parent bce273f commit 4bac141
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 2 deletions.
10 changes: 10 additions & 0 deletions TGit/Commands/MainMenuCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public void AddCommands()
CommandHelper.AddCommand(_mcs, SyncCommand, PkgCmdIDList.Sync);
CommandHelper.AddCommand(_mcs, CleanupCommand, PkgCmdIDList.Cleanup);
CommandHelper.AddCommand(_mcs, BrowseRefCommand, PkgCmdIDList.BrowseRef);
CommandHelper.AddCommand(_mcs, AbortMergeCommand, PkgCmdIDList.AbortMerge);

}

private void PreCommand()
Expand Down Expand Up @@ -128,11 +130,19 @@ private void MergeCommand(object sender, EventArgs e)
PreCommand();
ProcessHelper.StartTortoiseGitProc($"/command:merge /path:\"{EnvHelper.SolutionDir}\"");
}

private void AbortMergeCommand(object sender, EventArgs e)
{
PreCommand();
ProcessHelper.StartTortoiseGitProc($"/command:merge /abort /path:\"{EnvHelper.SolutionDir}\"");
}

private void RevertCommand(object sender, EventArgs e)
{
PreCommand();
ProcessHelper.StartTortoiseGitProc($"/command:revert /path:\"{EnvHelper.SolutionDir}\"");
}

private void CleanupCommand(object sender, EventArgs e)
{
PreCommand();
Expand Down
3 changes: 2 additions & 1 deletion TGit/IconMappings.csv
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ fec49b6d-c04a-42bd-b021-b8b2e5cfb291,16,d53d7256-d44d-4245-bdd2-bfd22943659c,16
fec49b6d-c04a-42bd-b021-b8b2e5cfb291,17,d53d7256-d44d-4245-bdd2-bfd22943659c,17
fec49b6d-c04a-42bd-b021-b8b2e5cfb291,18,d53d7256-d44d-4245-bdd2-bfd22943659c,18
fec49b6d-c04a-42bd-b021-b8b2e5cfb291,19,d53d7256-d44d-4245-bdd2-bfd22943659c,19
fec49b6d-c04a-42bd-b021-b8b2e5cfb291,20,d53d7256-d44d-4245-bdd2-bfd22943659c,20
fec49b6d-c04a-42bd-b021-b8b2e5cfb291,20,d53d7256-d44d-4245-bdd2-bfd22943659c,20
fec49b6d-c04a-42bd-b021-b8b2e5cfb291,21,d53d7256-d44d-4245-bdd2-bfd22943659c,21
4 changes: 4 additions & 0 deletions TGit/Images.imagemanifest
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<ID Name="Fetch" Value="18" />
<ID Name="BrowseRef" Value="19" />
<ID Name="Tag" Value="20" />
<ID Name="AbortMerge" Value="21" />
</Symbols>
<Images>
<Image Guid="$(CustomMoniker)" ID="$(ShowChanges)">
Expand Down Expand Up @@ -90,6 +91,9 @@
<Image Guid="$(CustomMoniker)" ID="$(Tag)">
<Source Uri="$(Resources)/Tag.xaml" />
</Image>
<Image Guid="$(CustomMoniker)" ID="$(AbortMerge)">
<Source Uri="$(Resources)/AbortMerge.xaml" />
</Image>
</Images>
<ImageLists />
</ImageManifest>
2 changes: 2 additions & 0 deletions TGit/PkgCmdID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,7 @@ static class PkgCmdIDList
public const uint Init = 0x139;
public const uint BrowseRef = 0x140;
public const uint Tag = 0x141;

public const uint AbortMerge = 0x142;
}
}
13 changes: 13 additions & 0 deletions TGit/Resources/Images/AbortMerge.xaml
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 M14,16z M0,0z M7,1C3.14,1 0,4.14 0,8 0,11.86 3.14,15 7,15 10.86,15 14,11.86 14,8 14,4.14 10.86,1 7,1z M7,2.3C8.3,2.3,9.5,2.74,10.47,3.47L2.47,11.47A5.755,5.755,0,0,1,1.3,8C1.3,4.86,3.86,2.3,7,2.3z M7,13.71C5.7,13.71,4.5,13.27,3.53,12.54L11.53,4.54C12.26,5.51 12.7,6.71 12.7,8.01 12.7,11.15 10.14,13.71 7,13.71z" />
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Viewbox>
Binary file modified TGit/Resources/octicons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TGit/Resources/octicons.pxd
Binary file not shown.
4 changes: 4 additions & 0 deletions TGit/TGIT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Page Include="Resources\Images\AbortMerge.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Resources\Images\Cleanup.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
12 changes: 11 additions & 1 deletion TGit/TGIT.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,14 @@
</Strings>
</Button>

<Button guid="guidTGitCmdSet" id="abortMerge" priority="0x0200" type="Button">
<Parent guid="guidTGitCmdSet" id="sixthMenuGroup" />
<Icon guid="guidImages" id="abortMerge" />
<Strings>
<ButtonText>Abort merge...</ButtonText>
</Strings>
</Button>

<Button guid="guidTGitCmdSet" id="tag" priority="0x0200" type="Button">
<Parent guid="guidTGitCmdSet" id="sixthMenuGroup" />
<Icon guid="guidImages" id="tag" />
Expand Down Expand Up @@ -435,7 +443,7 @@
<Bitmaps>
<Bitmap guid="guidImages"
href="Resources\octicons.png"
usedList="showChanges, pull, push, showLog, revert, branch, merge, differences, blame, repo, resolve, sync, commit, disk, switch, cleanup, stash, fetch, browseRef, tag"/>
usedList="showChanges, pull, push, showLog, revert, branch, merge, differences, blame, repo, resolve, sync, commit, disk, switch, cleanup, stash, fetch, browseRef, tag, abortMerge"/>
</Bitmaps>
</Commands>

Expand Down Expand Up @@ -481,6 +489,7 @@
<IDSymbol name="fetch" value="18" />
<IDSymbol name="browseRef" value="19" />
<IDSymbol name="tag" value="20" />
<IDSymbol name="abortMerge" value="21" />
</GuidSymbol>

<!--Special Context Menus-->
Expand Down Expand Up @@ -578,6 +587,7 @@
<IDSymbol name="prefDiffContext" value="0x0126" />

<IDSymbol name="tag" value="0x0141" />
<IDSymbol name="abortMerge" value="0x0142" />
</GuidSymbol>
</Symbols>
</CommandTable>

0 comments on commit 4bac141

Please sign in to comment.