AnkhSVN: Using Subversion within Visual Studio
Congrats to Arild for releasing AhknSVN RC2. If you're looking to use Subversion within Visual Studio, perhaps at work or perhaps you're working on an Open Source project at SourceForge, this is the tool for you.
NOTE: If you do use TortoiseSVN at the same time as Ankh, do note that they are linked to Subversion 1.4, so they will upgrade your local SVN working copies. Make sure you upgrade both at the same time.
To be clear:
IMPORTANT NOTE: TortoiseSVN 1.4.0-RC1 is linked with the Subversion 1.4.0-RC4 libraries. Due to various improvements made to the working copy library, the working copy format has changed. Using TortoiseSVN 1.4.0-rc1 on any working copy created by previous versions of Subversion/TSVN will TRANSPARENTLY upgrade your working copy, which means that production-ready versions of Subversion/TSVN (1.3.x and earlier) will no longer be able to read it! Please be careful, if you use other Subversion clients (eg. the 1.3.x command line client), not to use the TortoiseSVN 1.4.x release candidate on a production working copy.
-
Download TortoiseSVN 1.4.0 RC1 here (not required to use Ankh, but DO get it if you already have a 1.3 version of Tortoise on your system)
As with all things, YMMV and back up your life.
ADDITIONAL NOTE: If you get "Unable to retrieve folder information from the server" when using VS2003 in a Web Project, you may need to go into your TortoiseSVN settings and set "use ASP.NET Hack" which tells Tortoise to use folders name "_svn" to store details rather than folders named ".svn".
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
with svn.exe , the posibily is endeless, we wrapped it inside our build with NAnt and for interactiveness they are always powershell and stuff.
here's one example for our commit.build
%lt;!-- invoke svn up, and examine the updated item if it contains table the rebuild database --%gt;
%lt;echo message="[Please examine these new files" append="false" file="st.log.txt"/%gt;
%lt;echo message="if you need it then add , else delete or ignore]" append="true" file="st.log.txt"/%gt;
%lt;echo message="" append="true" file="st.log.txt"/%gt;
%lt;exec program="svn" commandline="st" failonerror="true" output="svn.st.log.txt" append="false"/%gt;
%lt;foreach item="Line" in ="svn.st.log.txt" property ="newfile"%gt;
%lt;if test="${string::starts-with(newfile, '?')}"%gt;
%lt;property name="has.new.file" value="true"/%gt;
%lt;echo message="${string::replace(newfile, '?', '')}" append="true" file="st.log.txt"/%gt;
%lt;/if%gt;
%lt;/foreach%gt;
%lt;if test="${has.new.file}"%gt;
%lt;exec program="n" commandline="st.log.txt"/%gt;
%lt;exec program="cmdcolor" commandline='-c Red "Theres new uncommited file, ignore, delete or add"'/%gt;
%lt;fail message="There's new uncommited file, ignore, delete or add"/%gt;
%lt;/if%gt;
Frankly I don't understand erymuzuan's comment.
The nice thing about IDE integration, and hence about AnkhSVN, is that it is aware of the composition of your development solution: it knows which files belong to it and wich do not, and it also knows when one logical unit consists of multiple files (e.g. System.Windows.Forms.Control subclass, which has a code file and a resources file). Automatically adding a file to version control when it's added to a project or solution is exactly the behavior I want!
My main reason for still using TortoiseSVN on the side is that with the old AnkhSVN this abstraction doesn't work as well as I'd like. Renaming project items didn't rename them in SVN. I rename things quite often so I hope this is fixed in the latest AnkhSVN. I did try the current beta of AnkhSVN about a year ago but it crashed on me - I don't recall the details.
Another nice aspect of IDE integration is not having to switch to the explorer for everything related to version control. I very often use selective diffs, selective commits, and selective reverts; this is much more convenient from VS.NET's solution explorer than it is from the Windows explorer (my current solution consists of 19 projects).
So all in all, AnkhSVN saves me quite a bit of time each day. Great to see that it's still moving forward.
Comments are closed.
http://www.visualsvn.com/
I plan on d/ling it and trying it next week when I'm at work.