Skip to content

Commit

Permalink
Added Tag command #35
Browse files Browse the repository at this point in the history
  • Loading branch information
sboulema committed Nov 9, 2017
1 parent 1dab450 commit 482596f
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 28 deletions.
7 changes: 7 additions & 0 deletions TGit/Commands/MainMenuCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void AddCommands()

CommandHelper.AddCommand(_mcs, RevertCommand, PkgCmdIDList.Revert);
CommandHelper.AddCommand(_mcs, ResolveCommand, PkgCmdIDList.Resolve);
CommandHelper.AddCommand(_mcs, TagCommand, PkgCmdIDList.Tag);
CommandHelper.AddCommand(_mcs, SyncCommand, PkgCmdIDList.Sync);
CommandHelper.AddCommand(_mcs, CleanupCommand, PkgCmdIDList.Cleanup);
CommandHelper.AddCommand(_mcs, BrowseRefCommand, PkgCmdIDList.BrowseRef);
Expand Down Expand Up @@ -155,5 +156,11 @@ private void BrowseRefCommand(object sender, EventArgs e)
PreCommand();
ProcessHelper.StartTortoiseGitProc($"/command:refbrowse /path:\"{EnvHelper.SolutionDir}\"");
}

private void TagCommand(object sender, EventArgs e)
{
PreCommand();
ProcessHelper.StartTortoiseGitProc($"/command:tag /path:\"{EnvHelper.SolutionDir}\"");
}
}
}
3 changes: 2 additions & 1 deletion TGit/IconMappings.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ fec49b6d-c04a-42bd-b021-b8b2e5cfb291,15,d53d7256-d44d-4245-bdd2-bfd22943659c,15
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,19,d53d7256-d44d-4245-bdd2-bfd22943659c,19
fec49b6d-c04a-42bd-b021-b8b2e5cfb291,20,d53d7256-d44d-4245-bdd2-bfd22943659c,20
4 changes: 4 additions & 0 deletions TGit/Images.imagemanifest
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<ID Name="Stash" Value="17" />
<ID Name="Fetch" Value="18" />
<ID Name="BrowseRef" Value="19" />
<ID Name="Tag" Value="20" />
</Symbols>
<Images>
<Image Guid="$(CustomMoniker)" ID="$(ShowChanges)">
Expand Down Expand Up @@ -86,6 +87,9 @@
<Image Guid="$(CustomMoniker)" ID="$(BrowseRef)">
<Source Uri="$(Resources)/BrowseRef.xaml" />
</Image>
<Image Guid="$(CustomMoniker)" ID="$(Tag)">
<Source Uri="$(Resources)/Tag.xaml" />
</Image>
</Images>
<ImageLists />
</ImageManifest>
1 change: 1 addition & 0 deletions TGit/Images.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<IDSymbol name="Stash" value="17" />
<IDSymbol name="Fetch" value="18" />
<IDSymbol name="BrowseRef" value="19" />
<IDSymbol name="Tag" value="20" />
</GuidSymbol>
</Symbols>
</CommandTable>
1 change: 1 addition & 0 deletions TGit/PkgCmdID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ static class PkgCmdIDList
public const uint Sync = 0x138;
public const uint Init = 0x139;
public const uint BrowseRef = 0x140;
public const uint Tag = 0x141;
}
}
13 changes: 13 additions & 0 deletions TGit/Resources/Images/Tag.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.73,1.73C7.26,1.26,6.62,1,5.96,1L3.5,1C2.13,1,1,2.13,1,3.5L1,5.97C1,6.63,1.27,7.27,1.73,7.74L7.79,13.8C8.18,14.19,8.81,14.19,9.2,13.8L13.79,9.21C14.18,8.82,14.18,8.19,13.79,7.8L7.73,1.73 7.73,1.73z M2.38,7.09C2.07,6.79,1.91,6.39,1.91,5.96L1.91,3.5C1.91,2.62,2.63,1.91,3.5,1.91L5.97,1.91C6.39,1.91,6.8,2.07,7.1,2.38L13.24,8.51 8.51,13.24 2.38,7.09 2.38,7.09z M3.01,3L5.01,3 5.01,5 3,5 3,3 3.01,3z" />
</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 @@ -295,6 +295,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Resources\Images\Tag.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Resources\Images\Switch.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
14 changes: 13 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="tag" priority="0x0200" type="Button">
<Parent guid="guidTGitCmdSet" id="sixthMenuGroup" />
<Icon guid="guidImages" id="tag" />
<Strings>
<ButtonText>Tag...</ButtonText>
</Strings>
</Button>

<Button guid="guidTGitCmdSet" id="sync" priority="0x0300" type="Button">
<Parent guid="guidTGitCmdSet" id="sixthMenuGroup" />
<Icon guid="guidImages" id="sync" />
Expand Down Expand Up @@ -427,7 +435,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"/>
usedList="showChanges, pull, push, showLog, revert, branch, merge, differences, blame, repo, resolve, sync, commit, disk, switch, cleanup, stash, fetch, tag"/>
</Bitmaps>
</Commands>

Expand All @@ -448,6 +456,7 @@
<KeyBinding guid="guidTGitCmdSet" key1="G" key2="W" mod1="CONTROL" mod2="CONTROL" editor="guidVSStd97" id="showChanges" />
<KeyBinding guid="guidTGitCmdSet" key1="G" key2="B" mod1="CONTROL" mod2="CONTROL" editor="guidVSStd97" id="blameContext" />
<KeyBinding guid="guidTGitCmdSet" key1="G" key2="D" mod1="CONTROL" mod2="CONTROL" editor="guidVSStd97" id="diffContext" />
<KeyBinding guid="guidTGitCmdSet" key1="G" key2="T" mod1="CONTROL" mod2="CONTROL" editor="guidVSStd97" id="tag" />
</KeyBindings>

<Symbols>
Expand All @@ -471,6 +480,7 @@
<IDSymbol name="stash" value="17" />
<IDSymbol name="fetch" value="18" />
<IDSymbol name="browseRef" value="19" />
<IDSymbol name="tag" value="20" />
</GuidSymbol>

<!--Special Context Menus-->
Expand Down Expand Up @@ -566,6 +576,8 @@
<IDSymbol name="revertContext" value="0x0124" />
<IDSymbol name="diffContext" value="0x0125" />
<IDSymbol name="prefDiffContext" value="0x0126" />

<IDSymbol name="tag" value="0x0141" />
</GuidSymbol>
</Symbols>
</CommandTable>
52 changes: 27 additions & 25 deletions TGit/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="2eb0e74d-a27d-4c41-bca4-7e9e9befaa18" Version="4.7" Language="en-US" Publisher="Samir L. Boulema" />
<DisplayName>TGit</DisplayName>
<Description xml:space="preserve">Control TortoiseGit from within Visual Studio</Description>
<MoreInfo>https://github.com/sboulema/TGit</MoreInfo>
<License>Resources\License.txt</License>
<GettingStartedGuide>https://github.com/sboulema/TGit/blob/master/README.md</GettingStartedGuide>
<ReleaseNotes>https://github.com/sboulema/TGit/releases</ReleaseNotes>
<Icon>Resources\Package.ico</Icon>
<PreviewImage>Resources\Preview.jpg</PreviewImage>
<Tags>Git, Source control, Tortoise, repository</Tags>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.Pro" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
<Dependency Id="Microsoft.VisualStudio.MPF.12.0" DisplayName="Visual Studio MPF 12.0" d:Source="Installed" Version="[12.0]" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0.25904.2,16.0)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Metadata>
<Identity Id="2eb0e74d-a27d-4c41-bca4-7e9e9befaa18" Version="4.8" Language="en-US" Publisher="Samir L. Boulema" />
<DisplayName>TGit</DisplayName>
<Description xml:space="preserve">Control TortoiseGit from within Visual Studio</Description>
<MoreInfo>https://github.com/sboulema/TGit</MoreInfo>
<License>Resources\License.txt</License>
<GettingStartedGuide>https://github.com/sboulema/TGit/blob/master/README.md</GettingStartedGuide>
<ReleaseNotes>https://github.com/sboulema/TGit/releases</ReleaseNotes>
<Icon>Resources\Package.ico</Icon>
<PreviewImage>Resources\Preview.jpg</PreviewImage>
<Tags>Git, Source control, Tortoise, repository</Tags>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.Community" />
<InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.Enterprise" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
<Dependency Id="Microsoft.VisualStudio.MPF.12.0" DisplayName="Visual Studio MPF 12.0" d:Source="Installed" Version="[12.0]" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0.25904.2,16.0)" DisplayName="Visual Studio core editor" />
</Prerequisites>
</PackageManifest>
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 4.7.{build}
version: 4.8.{build}
skip_tags: true
configuration:
- Release
Expand Down

0 comments on commit 482596f

Please sign in to comment.