sábado, 2 de junio de 2012

SVN Tortoise - ANK - Visual Studio 2010

How to use Tortoise SVN in Visual Studio 2010?


1. Install ANK for visual Studio 2010

Tools->  Extension Manager -> Search: AnkSVN - Subversion Support for Visual Studio

2. Install Tortoise SVN.

3.Looking for a free SVN server, for example Assembla.

Upload your files in the server choosen.


4. In Visual Studio 

Tools -> Options -> Source Control -> Plug-in Selection -> Select AnkhSVN
5. Donwload your project from the server and open it in visual Studio 2010.




For example 
My Assembla directory is:
http://subversion.assembla.com/svn/JJTripode_GenericPos/
























































Find and Replace with a Break Line - Regular Expresions

I had a hard time trying to replace :



with




I had to replace it nearly 1200 times!!!!, then I found a SEXY way to do it  USING
THE FIND AND REPLACE WINDOWS AND REGULAR EXPRESIONS:
I manage to do that with this:

find       : e\)\n:b^12\{ 
replace : e\)\n            \{\n                Log(e);


Explanation:
Find Pattern:  'e' follow  ')'             note:  ')'  is a special character in regular expresion then if you want to include it in your pattern you have to put escape caracter before '\'.
\n indicates break line | new line.
:b indicates a white space, then   ^12 indicates repetitions. :b^12 indicates 12 white spaces.
\{   escape character follow {.

Replace pattern:
The only change is that the 12th white spaces must be changed by explicit twelve white spaces.


Another Example: Add [Serialize] to a Class

namespace Entities\n\{

namespace Entities\n\{\n[Serializable]