Categories
Agile Career Growth Tools and Utilities

remove/delete svn folders

Since I’ve been using SVN and stumbled upon this technique I’ve also been using since then

This is one of the many (but easiest way) to remove SVN folders (.svn) recursively from a given folder. Effectively “unbinding a folder from SVN

Follow these easy steps: [more]

1) download this registry file : DeleteSVNFolders.reg (313.00 bytes) – see below notes for more information (security issues/verification and code source). I urge you to review them but if you don’t want to worry about the details and trust me enough then please go ahead and download.

2) double click on the file you downloaded

    you will be prompted to confirm that you really want to perform the action (differs depending on your OS). just continue and should all go well you will have a successful message/dialog

3) then to see it work go to the folder you want to remove the .svn folders from, then right click it

you should see the “Delete SVN folders” menu item

4) Click the said menu item and the .svn folders will be removed (there will be a command window that will show up displaying progress too – though if the folder structure is not that deep enough it might disappear very quickly).

 

And you’re done

** Notes

1) altering your registry not for the faint-hearted and you’d have to trust the author/publisher. In this case I do and I have been using it for years

    and if you could also look into it (edit e.g. notepad or text editor) and understand what it does if you want to make sure you’re not letting it do something you don’t want

    i have taken this from : Jon Galloway’s Shell Command – Remove SVN Folder and simply created the reg file to be downloadable (for those who are not so confident on how to deal with reg files)

Categories
.NET Agile Tools and Utilities

Link: Sandcastle Source Code published in Codeplex

After some issues regarding the license and terms of SandCastle in CodePlex, the project is now again available at CodePlex; this time with source code and not just the executable and documentation.

You can read more on this at this SandCastle blog post : Sandcastle Source Code published in Codeplex

Or go directly to their site at CodePlex : http://www.codeplex.com/Sandcastle 

Categories
Agile

Subversion Branches, Tags and Merges

I found this great article by Bill Simser on Day-to-day with Subversion where he explains practical use of Subversion branches, tags and merges. As a additional reading it might help if you read the documentation on branching and merging from the SVN Book from here but Bill's explanations made me understand better. And allow me to share my notes on this. [more]

I haven't had much experience on branching/merging with SVN yet but in the scenario presented in the article where you create a branch when you need to work on new features but maintain fixes on the currently deployed version in production what I've known is that the developer would work on the new features locally while the rest of the team works on main codebase (trunk). That poor developer will not check in any changes he/she made to the repository until he/she has it done.

From time to time the developer should retrieve/merge changes made to the trunk (to his/her working copy) to make sure that he/she gets the changes in increments rather than a whole bunch of merges when he/she finally checks in the code. This daily merge is applicable in both Bill's suggested approach and the one I've known (let's call it "no check ins until feature is done").

The disadvantage with "no check ins until feature is done" is that the poor developer looses any version control capability on his/her daily changes or worst since no check ins are made to the repository, once the local machine crashes, all those days/weeks of new features changes are bye bye.

So branching and merging may seem a little complicated than simply maintaining a trunk and doing all changes there and for any new feature no changes will be checked in until all changes to accomodate the feature is stable and integrated succesfully. But the former will enable the poor developer working on the new feature to version his/her own changes in his/her own small new features world and prevent the risk of loosing it bigtime.

Another common scenario when maintaining a trunk but poor developer still wants to check in small changes for the new feature from time to time is to comment out the new feature code before checking it in. In that way, there is revisions are tracked but doesn't affect the application since they're commented out. But this leaves us with a lot of commented out code not being used or as mentioned in the article, a ghost button where if clicked doesn't do anything or a cardinal rule which says "don't click this button, it's there but it's not implemented yet".

Warning though, branching and merging should not be abused too and would take some skill/experience to determine when to branch versus making the new version changes on the trunk directly. Out if my head I could think of simple refactoring and bug fixes should be made to the trunk but new major revisions such as migrating from .NET 1.1 to .NET 3.5 or architectural changes should go with branching/merging.

FInally, note that regardless of your approach to branching and merging vs.
making all changes to trunk, tagging on the other hand is another story
and must always be used when labelling/cutting versions.

Categories
Agile Tools and Utilities

VisualSVN Server

In a previos post on My SubVersion experience I received a comment from
Ivan Zhakov of VisualSVN to try out the said product (which by the way is free) and so I did. [more]

Not much to say except that it was an amazing experience. No issues with installation, simple but does it wizard steps (eg. option to use port or HTTPS, default repository folder et al) and an MMC management console. Now I don't have to edit config files manually and instead do it from a GUI. They also have a windows service to start VisualSVN which also handles the management of the Apache server.

As mentioned it comes with Apache installed, lets you choose which port to run apache and since I don't really need it running all the time the windows service did it for me. If you do need to tweak things in your apache installation I'm sure you could also do as you please since I can see the files are just in the VisualSVN installation folder (default ProgramFiles/VisualSVN). Not an apache guru here but the conf files are editable and probably so are the rest of the features (modules whatsoever).

No issues so far (and I hope for good). Good to know some things about SubVersion binary packages installation and some things you can do from command prompt but if don't want to complicate things and need a simple enough solution to have subversion working I suggest you use VisualSVN server as I do now.

Categories
Agile Tools and Utilities

My Subversion (Version/Source Code Control) Experience

I had a chance to look into subversion today and here are some of my notes. It's a version control system (source code control but it's really more than just code) along side Visual SourceSafe, SourceGear Vault among others. Why subversion [more]of all other is worthy of another post but first one, it's free (Vault is also free for single user/personal i think but in that case Subversion is more widely accepted in the community and some issues with JetBrains TeamCity support for Vault made me think that Vault may not be that frictionless when it comes to Continuous Integration – not sure if CruiseControl.NET supports it).

Moving on, there's just not much to say my experience but it just works. Some caveats since I haven't read the documentation and instead jumped right in but I'm happy with my first checkin/checkout after a few minutes.

1. I got the latest (i think) Windows Installer (with the basic win32 binaries) from the following link:
svn-1.4.6-setup.exe
.

Also note that you can get to this from their home page by clicking on Downloads from the treeview on the left of the site. Then go to the windows section. Furthermore you could reach the same page by clicking on Documents and Files from the same treeview on the left. After redirection to the Documents & files page, on the treeview that appears in the main content of the page, traverse subversion > releases > windows (or further to windows apache 2.2.x node for binaries built against the famous apache web server version 2.2).

2. Install (in my case I installed on a Virtual Machine I have with Windows XP)

4. I then created a sample repository by issuing the following command (command line dialog/cmd) "svnadmin create C:svntest_repository" where C:svntest_repository is an existing folder in my system. There are some articles that mentioned issues when the directory doesn't exist and rather than test and verify it, I created the folder before issuing the command (but feel free to try it and tell us how it goes). Looking at the C:svntest_repository directory I found new directories/files created so on the right track here.

6. Then I was wondering now that I have SVN setup, what will be my server URL? I have worked with http/https/svn URLs before but merely as a client who connects to it. I tried to connect to it using SmartSVN (client) which I'm already familiar wit. You can also use TortoiseSVN but coming from Visual Source Safe and Vault background, I prefer not to work with SVN from the windows explorer (as TortoiseSVN does).

So I was trying to connect without knowing my SVN server URL (yeah, using SmartSVN but not so smart there) and just trying random URLs like say my internal IP was 192.168.1.7 so I tried http://192.168.1.7 or svn://192.168.1.7 with or without the test_repository relative path. Obviously no luck there and getting some thing like "connection refused" (sorry should have noted the specific messages).

After some digging it turns out that you have to have a server to access the repositories (duh, so that's why apache has been mentioned all over)

I don't have apache setup so I was wondering if I could live without it. So after some walk around the documentation I found Overview of Server Configuration and there it is svnserve. The documentation is very impressive if only I've read through it first but diving right in without reading much still worked for me. Here's a link to the main page for the Subversion Book multi-page html edition index. Or you can also check out the the Subversion Book for other available editions (eg. PDF)

6. I started svnserve as a standalone daemo using the -d switch and tried to access it using SmartSVN (from my host machine). The command was svnserver -d. Tried to connect using SmartSVN again.

(File > Create Module menu item > "select local directory to import to repository" > setup repository profile). Hmm, should probably have made a post on SmartSVN or tortoise but feel free to drop me questions if ever or chekc out documentation for SmartSVN or Tortoise on "importing local files to repository"

Moving on. Oops, I was getting new errors along the lines of "no repository can be found at URL (svn://192.168.1.7/test_repository)". Hmmm, sounds bad but not so bad coz somehow it is now able to recognize the server, it just can't find a repository in there. Again, checking the documentation, it turns out that you have to use svnserve's -r switch if you have to use that path. That is without the -r switch your repository URL should append the full path of the repository (C:svntest_repository). The samples given are in UNIX so not sure how it should look like in windows (will try when i can), maybe svn://192.168.1.7/"c:svntest_repository"? But bottom line is that i started svnserve with this command instead "svnserve -d -r c:svn" and accessing the repository URL as svn://192.168.1.7/test_repository now works. great.

So guess that's it. Pardon any incoherent thoughts above (if any) but hope this benefits someone other than future me. Back to work.