Mike’s Dump

March 9, 2006

VSS: File Renaming

Filed under: Code — mikesdump @ 12:27 pm

I have been using source control for about 7 years now. The time I have spent has almost equally been split between StarTeam and VSS (not sure if this is the right URL). Although I can’t remember many of the features in StarTeam I remember the feeling. It felt warm and safe like
sitting on a beach at a fancy resort. Where VSS feels like you are sitting on ice at the North Pole wearing nothing but your birthday suit.

In the past I have always avoided renaming files in a project under source control because I didn’t want to lose the history. Renaming
files that are under source control would not be required that often if people didn’t check in “Form1.vb” but that is another story.

The other day I had enough of Form1.vb staring back at me in the project that I was working on so I decided to act. Here is what I did:

1) Opened up the VSS browser
2) Found the evil Form1.vb and all of its resx files and renamed to something more suitable (Form2 was the first thing that came to mind
but I settled on MainForm since this is the only form in the project)
3) Started the project in VS.NET and checked out the project and Form1.vb
4) Renamed the file
5) Acknowledged the five warnings on how the world can end by renaming a file and one warning on how “MainForm” already existed under source control.
6) Check in the project and “new” MainForm

I opened my newly named form and it appeared to be intact. I checked
out the file, made a trivial change and checked it in and check the
history it all looked good.

I’m sure there are people out there saying didn’t you read the freak’in
help on how to do this? And my answer of course would be, NO. If there
were help on how to deal with this I would hope a technical writer
would say, “Hey, this sounds like a real pain in the ass. Do you think
maybe this should be enhanced? Renaming files is something that might
happen� from time-to-time”.

As much as I hated the process I was pretty happy this worked until tonight.

At home I setup Subversion a little
while ago. I have TortoiseSVN
installed which integrates with Windows Explorer and I have Ankhsvn installed for VS.NET 2005 integration. A
few nights ago I checked in my first real project and realized I forgot
to rename one folder within the project. I went into VS.NET, renamed
the folder, checked in the project and BANG! All the files under the
old folder were under the new one like I would expect and I could even
go into the repository browser to see a graph that showed at what
version the folder name changed.

So if you have tips on how to easily change file names that are under
VSS control you could leave them as a comment. But, what would be more
appreciated is marketing propaganda on why a development shop should
dump VSS for subversion 🙂



  1. While I like Subversion (and use it at home), my experiences with it professionally have been less than solid (so you may want to "moderate" this comment 😉 ).

    My most recent job used SUbversion for version control but seemed to have a great deal of problems doing so. There were several different instances of developers making a project check-in only to find an error occuring
    at the end of the process. The obscurity of some of the errors in Subversion rival anything produced by larger companies many of them just taking the form of "xxx-178293: error occured". This would then leave the project in an inconsistent state where no developer could actually figure out what *was* in Subversion and was wasn’t, often leading to entire directories being deleted and completely re-added to Subversion.

    Subversion also seemed to have some problems when resolving conflicts between two binary files as it kept trying to merge the two. 😉

    Now, this all being said, this was also the largest file tree I have ever professionally witnessed and it might be that Subversion just doesn’t scale very well to something quite that large (it works fine for me when I am working on DasBlog, for example). I like it but I’d hesitate to recommend it as a replacement at the enterprise-class level. This isn’t to say I like VSS all that much, just that my experiences with it have been slightly more stable. Of course, my job used VSS prior to switching to Subversion because they were experiencing VSS DB corruption quite often so it’s always possible they are just doing something weird there. =)

    On a completely unrelated note, was that the most intense 2 hours of 24 ever or what? The sounds of hands squeaking against the glass – so creepy!! And that last minute with Edgar running out was pretty brutal. I was asking my wife, "What about Edgar?" and then he runs out and you already know what’s going to happen…

    Comment by Justice — March 10, 2006 @ 10:39 am | Reply

  2. Doh!

    Well that’s too bad too hear. I really haven’t used Subversion all that much to give a real strong argument to why someone should switch away from VSS.

    I have read about issues to related to VS.NET integration and web project but I haven’t tried too much yet so who knows. Maybe in a month I’ll write a new post on how much subversion stinks (hope not)

    Maybe I can just stick with complaining how VSS isn’t StarTeam 🙂

    Thanks for the real world feedback!

    24 = Awesome! Sandy heard someone died and the rumor she heard was that it was Jack. I didn’t think for a second that was true (unless they brought him back to life again). Once Edgar left to check on that other person I knew he was a gonner. Should be good next week.

    Comment by mike — March 10, 2006 @ 4:59 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: