Ankh Svn Client Side Hook - visual-studio-2010

My question is simple; I wish to use tortoisesvn-esque client-side hooks in Ankh svn, how do I go about this?
I've toggled the "Enable Client side hooks" in Tools->Options:Source control->Subversion
in my visual studio 2010 environment, but I have no idea where to store the hook-scripts.
It does not connect to the ones in my tortoise svn folder, and copying them to c:\Program\AnkhSVN 2\hooks doesn't work either.

Are you sure your using TortoiseSVN's Cient Side hooks?
They aren't stored in the folders and are what AnkSVN uses...

Related

How to uninstall git from Visual studio?

Please suggest the option of Uninstalling the GIT Source Control Provider. I've never used it and have used TFVC for many years. I have no intention of ever using GIT but today when I added a project to source control it went to GIT instead of TFVC even though my default provider was and always has been Visual Studio Team Foundation Server
I've never used it and have used TFS for many years. I have no intention of ever using GIT
Don't presuppose of the future! 😉
There is a big switch movement for a reason (even Microsoft switched to it internally). Perhaps you should have a careful look at it because it brings a lot more flexibility and other things that could improve your development workflow.
Also FYI, the right term is TFVC, not TFS (which is the whole ALM solution and that could host TFVC or git repositories) .
Anyway...
You must not uninstall git tool but uninstall git plugin of visual studio. There are some solutions proposed (remove some registry keys or rename extension file) here:
How can you disable Git integration in Visual Studio 2013 permanently?

How to quickly switch source control providers in Visual Studio 2010?

I'm currently working on .Net projects that are using either Git or Mercurial (Hg) source controls. I use Visual Studio 2010 for all of these projects. As I often have to switch source control providers I was wondering if there's a quick way to do this, so I don't have to go Tools -> Options -> Source Control once an hour.
A much better solution would be if Visual Studio would recognize which source control provider it needs or maybe remember which provider was used for a certain project. Can that be done?
With a nudge in the right direction I managed to handle this problem even better then expected - no switching necessary.
For Mercurial solutions I use VisualHG and for Git I use Git Source Control Provider. I also installed HgSccPackage. Now I don't really know how or why this works, but I've got GitSCC selected as the Source Control Provider in the settings, but when I load a Mercurial project VisualHG takes over. All I have to do is set the SCC to VisualHG the first time I open the project, close the project, change back to GitSCC and when the project is reloaded VisualHG will be used for it.
Interestingly it does not work without HgSccPackage installed. If someone can explain this, please do.
Note that it does not seem to work the other way round.
I use Git in combination with VS 2010 by keeping a commandline screen open. I do my work in Visual Studio and when I'm ready to make a commit, I switch to the commandline screen.
If you do this, you can use Git and Mercurial side by side in combination with VS 2010.

How to use Mercurial from Visual Studio 2010?

Version Control noob alert
I've already installed both Mercurial, TortoiseHg and VisualHG into Visual Studio 2010. I've set in Visual Studio my source control to Mercurial.
When I right click on my solution, I already see HG's buttons in the context menu that appears there.
My question now is, how do I make this version control thing work? It seems I'll have to make some kind of configuration before, as it tells me "Solution is not under Mercurial version control" when I click in "HG Status".
Thanks
with tortoiseHG you can rightclick on an explorer window and do tortoiseHG -> Create Repository Here which runs hg init for you. I believe currently there is no way to run hg init from visualHG.
TekPub has a good free video for using Mercurial with TortoiseHG, VisualHG, and VS along with pushing the repository to the public via CodePlex. In it, Rob Conery shows how to create a repository in your VS solution and how to work with commits, branches, merging, etc.
It's especially good for those coming from a Subversion background because he points out how branches/merging/forking is not so challenging in Mercurial as it's been known to be in Subversion.
YouTube link as other link is dead:
https://www.youtube.com/watch?v=HV8e1NQ-8gU
Not sure how to do this within Visual Studio but it is easy to do from the command line. Just
exit VS and go to a command prompt at the root folder of the project(s) you want to put under source control and type "hg init". Then load the solution and verify that hg is the selected source code provider.

AnkhSVN not Recognizing my Solution as being in Source Control

I did not go the route of using the ankhSVN context menu in VS to add my solution to SVN. I went the route (because I prefer to and like how tortoise does this) of using Tortoise to add my folder/project to SVN for the first time.
Then when I opened that solution, VS opens but ankhSVN still did not flag my files or recognize a connection to svn.
what's the deal? I don't want to be forced to only use ankhSVN to commit a project for the first time to SVN in order for ankhSVN to bind or recognize and kick in.
Most likely, AnkhSVN isn't loaded yet at this point. Go to Tools - Options - Source Control, and select AnkhSVN as the active SCC Provider. Then go to File - Subversion - Change Source Control, and connect/bind the solution. This causes Ankh to be loaded the next time you open the solution by annotating the sln file. Other people checking out the same sln file also benefit from this, because Ankh is then loaded directly.
The times I had this issue it was because SVN was updated and ankhSVN didn't support the type. I fixed this by either rolling back the SVN update or install the lastest version of ankhSVN which sometimes is the beta version.
I had the same problem, usually this fixes it:
Right click on the solution node of the Solution Explorer. In the context menu, go to Subversion... Refresh Status.
Or as Stefan points out, just use the Ankh toolbar in Visual Studio.

Can You Use AnkhSVN and VisualSVN at the Same Time?

I'd like to try out a feature of AnkhSVN (namely, integration with Red Gate SQL Changeset tool) without doing an complete uninstall of VisualSVN. It feels dodgy, so I wanted to see if anyone else had experience that would either alleviate or confirm my fears.
Update
So I tried uninstalling VisualSVN and dropping in Ankh. As far as working within VSS itself, the change was completely transparent. Sadly, SQLChangeset did not work with this plugin, so that part of it was in vain.
Switching back was also painless, even to the point of not having to re-enter my license. So, good knowledge but no joy on the long-term goal.
Sort of. I've been able to install VisualSVN and AnkhSVN on Visual Studio at the same time. However, you won't be able to use both at the same time. VisualSVN is an add-in, while AnkhSVN is truly a source control plugin. To use one or the other, you simply have to disable source control binding (for AnkhSVN) or disable the plugin (for VisualSVN).
In my experience, though, I've found that VisualSVN was a much better client than AnkhSVN. VisualSVN handles ignoring user files (*.suo) and adding projects to Subversion very efficiently. AnkhSVN on the other hand, caused me some difficulty.
Hope this helps!
I haven't tried it, but I know Visual Studio supports multiple source control plugins. You just pick which one is active from the options by choosing Tools->Options from the menu and then finding the Source Control->Plug-in Selection page in the tree control on the left side of the window that opens.
It should just be a matter of installing Ankh and selecting it there for your tests, then setting back to VisualSVN when done. Of course, that assumes everything plays nice together.
You might be able to turn off / disable VisualSvn in Tools -> Addin Manager, and then select AnkhSvn as the current SCC Provider.
Can you describe how this changeset tool works, and how that should integrate with AnkhSvn?

Resources