TFS vs. Subversion fact check

Book an Expert

 

subversionI spotted a good comparison of TFS vs. Subversion by Jarosław Dobrzański on DZone (you can also read the original post) but I feel that a couple of the points were either out of date, or borne out of a lack of knowledge of the product, or even more likely I just missed the point. This article was taken from the perspective of an SVN user who has moved to TFS, and I am not in that category.

  • Updated 15th October 2010

    • Adam Cogan provided some very useful fixes to make this a little more readable.

    • Sven Hubert wanted some advantages as well, but with this post I wanted to specifically target the issues and problems that an SVN user had encountered which is why I only targeted weaknesses.

    • Bahadir ARSLAN wanted to call out the shell integration provided by the Power Tools.

  • Updated 18th October 2010

    • Jeroen Haegebaert provided some useful comments on Checking out which I have answered inline.

  • Updated 19th October 2010

    • Ben Day provided some useful updates

    • Simon Bromberger made some excellent points about rollback being a little hidden, but any TFS Admin with his salt can use a command line


I want to take a look at each of the “Weak points” mentioned and see if there is anything in them. There are numerous things that TFS does that are not even possible in SVN as SVN is just a source control system and not a full ALM platform. The goal of this post is specifically to dispel myths and target issues that users have moving from SVN to TFS.

#1 – Branch confusion

>>Subversion promotes a very clear view (similar to CVS) on the files tree on the server: trunk, branches, tags. In TFS everything is in one bag – branches are simple directories among the other content of ‘the trunk’. It still looks messy to me.
-Jarosław Dobrzański

Fixed in TFS 2010: This was the case in versions prior to TFS 2010, but with the new branching features it is easy to both see where your branches are and what change sets have been merged to which branches.

image
Figure: Branches are easy to identify

If you have your branches setup as just directories in the trunk then it is probably the case that your company is just doing it wrong. You should have a standard layout as I have shown above, and indeed this is the format that is recommended in the TFS Branching Guidance and I would recommend that you read it before you just dive into branching.

#2 – Checking out

>>If you want to edit a file you need to check it out for edit so that it’s listed in Pending Changes window after it’s changed. If you edit a file directly in Visual Studio it checks it out for edit automatically; however, if you make the changes outside Visual Studio (you need to change Read-only property prior to that) and forget to check it out for edit in Visual Studio the file is not listed in Pending Changes window. Consequently, the risk of not including that item while making a check-in increases (I personally experienced that a couple of times….)
-Jarosław Dobrzański

Having never used SVN and having come from a Visual SourceSafe background I have not had this problem, but I have heard this from many other SVN users and I completely agree and understand the perspective. Although I find it difficult to understand how you know which files you have checked out when you don’t have this, it looks like all the source control products are going in this distributed direction and I will just have to go with the flow.

But if he will setup TFS Power Tools, he has doesn’t need to use Visual Studio. At Window Explorer, he can see which files are binded to a source control or he can check-out or check-in. Just install Power Tools..
-Bahadir ARSLAN

 

>>Subversion simply gives you an easy way to determine which files have *changed* against their repository version. This is MUCH more useful than the VSS/TFS counterpart, which only gives a view of “which files I have touched since my last checkin”.
- Jeroen Haegebaert

This does not help me if I did not check out the file and have no access to the disk it was checked out on:

  • As the TFS admin or Project Manager I want to be able to see which files you have been working on so I can make sure I understand the depth and complexity of something I thought was a simple change.
  • As a developer I want to check who else has a file checked out so I can coordinate me efforts with them. I don’t want to make sweeping refactor changes if you are also making a bunch of changes that will be irrelevant once I check in.

>>Qny edited file stay checked out, even if you (manually) revert your changes (think CTRL-Z). So in the end the “checked out files” list is often not very useful anymore.
- Jeroen Haegebaert

This is really just a difference in the products. Just like VSS users needed to get used to the lack of Sharing and the differences in labelling, there will be habits that work weak for SVN, but not so much for TFS.

With TFS you should be using the tools provided so this never happens. If you call “Undo Checkout” it will automatically revert to the server version. You never know the server version may have changed since you last checked out

image

Figure: Using Windows Explorer you never get your checkout’s out of sync

 

#3 – Windows only

>>It’s dedicated to Windows platforms only, but this is hardly a problem for a team who uses Visual Studio.
-Jarosław Dobrzański

imageFixed in TFS 2010: This one is just plain wrong. I don’t blame the author, I would be much more inclined to blame the marketing team a Microsoft for not making this as big a deal as it should be. Can you say “Team Explorer Everywhere”.

This was originally a third party product called Teamprise that integrated Eclipse into TFS, but with its purchase by Microsoft and the launch of TFS 2010 they have beefed it up so that it supports:

  • Apple Mac OS X
  • HP-UX
  • IBM AIX
  • Linux
  • Solaris
  • Unix
  • Windows

On top of that it also supports :

  • Eclipse
  • IBM Rational Application Developer
  • Adobe Flex Builder
  • Aptana Studio
  • others

This is a massive move by Microsoft to increase the reach of TFS to other platforms, and with the TFS application model being completely service based more diverse support will be coming in the future.

#4 – Reverting changes

>>Weak support for reverting changes
-Jarosław Dobrzański

I don’t know if weak is the correct word, but yes it is difficult. It was designed to be difficult as you don’t want your developers thinking that it is OK to check-in crap because they can always revert it. I don’t know about you, but I do not want to ever have to revert a change. If I do, it shows a failing in a quality gate somewhere that needs fixed.

Seems a red-herring because it does already work, but developers don’t need to use this feature as they use history and annotate to see what happened only.
-Adam Cogan, Chief Architect at SSW

I like this being hard…

#5 – Cost

>>It’s not a free tool

msdn_comThis is really only partly true. Anyone with a MSDN subscription has a license to both run a TFS server and to connect to any TFS instance, couple that with SQL Server Standard being included in the definition of a TFS License then you can pretty much run TFS for free. If you have some business users that do not have MSDN, then yes, you will need to buy some retail CAL’s, but with the retail TFS 2010 at £500 that includes 5 users without CAL’s price is not an excuse not to use TFS.

CP_banner_111x111_genIf you are an open source developer with no MSDN subscription then you can use Codeplex which is completely free from end to end.

One thing I always think about for cost is the on-going support cost. With SVN you are at the mercy of forums and community support that, while often good, is not always timely. TFS is a fully supported retail product, and with the addition of Work Items, Build and Lab all from the same product you don’t even need to think about nor support the communication between them.

#6 – Difficult to install

>>Complex installation
-Jarosław Dobrzański

Fixed in TFS 2010: This was VERY true in TFS 2005 and TFS 2008, but in TFS 2010 the installation is so easy my Dad could do it. I blogged about this during the beta and managed to install and configure TFS 2010 in under 30 minutes.

#7 – Switching between branches

>>Lack of switching feature. With Subversion I could easily switch between trunk and branches / tags, still using the same source directory. The action was straightforward and quick. On TFS you need to make a full check out of the other branch, which is longer and requires additional actions (e.g. IIS settings for new virtual directories)
-Jarosław Dobrzański

I don’t really see this as a product issue but a source control issue. And since you would always use source control and have this problem the point is moot.

However I do see that this is kind of true as TFS enforces folder/source parity. So I can agree with this, but I also agree with the way that TFS does things. I do not want developers to be under any ambiguity of which branch they are working with, nor do I want them to be able to mistakenly check into the wrong branch.

I always run each branch separately on my local development computer and the minor setup of IIS or other stuff is really just that, minor.

#8 – Reverting changes again

>>Poor support for revert (roll back). It’s not that easy to revert a check in (especially if it includes lots of files). Official roll back instruction sounds like a workaround…
-Jarosław Dobrzański

Duplicate? Having covered this already I don’t know why it is in here twice, but never mind. The official link above while for VS 2005 is a good solution for rolling back a single file. Remember that there is high fidelity between files checked in at the same time and a check-in becomes an atomic unit. If you want to rollback a single file, then this is the easiest and least painful way. There are methods for rolling back whole change sets, but again these are things you do not really want your developers doing.

I should also note that in my 3 years as an ALM MVP and 9 years using source control I have only had to do a rollback on one occasion. It should be an edge case with edge case support so developers learn to do things correctly in the first place.

>>I’m not sure that it is reasonable to say that rolling back change sets in TFS should be a pain because your developers are doing it wrong. Unfortunately this has been a requirement several times for at crucial project points.
-Simon B

When I said difficult I was being a little facetious :). I do like that it is not an obvious feature, and in fact you need elevated permissions to run the tf.exe rollback command, not just any developer has the power.

>>I would argue that it is clearly a missing feature and that making the process byzantine in its complexity is not helpful and if it is intentional, the intention must have been to cause pain.

When we are dealing with complex builds against non-MS data sources and the only way to verify fully that builds are working is to check in code. With the best will in the world inconsistencies occur between developer and build machines, between development and staging/live database environments. You might say that in TFS 2010 we can simply use gated check-ins. However this is not quite the “magic bullet” it appears. As far as I understand this requires the server to carry out on-the-fly automated merges which even if you’ve done a forward integration beforehand may present you with merge issues
-Simon B

Regardless of the reason I do not want developers to check-in anything that has not passed a build and test. I agree that Gated Check-in is not a silver bullet (nothing is) but with the right amount of effort in the build and test stages there is nothing you can’t do. You are right that it is possible for a gated Check-in to fail because you were piped-at-the-post by another developer, but is that any different than multiple feature teams merging into the same Main branch. This is just the cost of doing business for developers and I would posit that it would be worse if the first developer checked-in something that broke the build and prevented the other developers from checking in. I am not saying that this could never happen, but minimising this is key.

With TFS 2010 if you really want to kick that nut in the head then enable Gated Check-in’s on all of your branches. Then developers can’t check-in until the build with all of the tests pass.

>>Developer do make mistakes, please let TFS admins undo them with the minimum of pain.
-Simon B

We can all make mistakes and it could not be easier for a TFS Admin to undo a developer change with the power of TF.exe

Conclusion

I really liked this post by Jarosław Dobrzański, and I hope my response clears up some of the misconceptions surrounding TFS. It is always good when people that have had to move from SVN to TFS describe the differences once they have worked with it for a while.

 

 

Technorati Tags: ,,
TFS vs. Subversion fact check was last modified: October 14th, 2010 by Martin Hinshelwood

-Every company deserves working software that successfully and consistently meets their customers needs on a regular cadence. We can help you get working software with continuous feedback so that your lean-agile teams can deliver continuous value with Visual Studio ALM, Team Foundation Server & Scrum. We have experts on hand to help improve your process and deliver more value at higher quality.

  • Bahadir ARSLAN

    Hi,

    Very good post as an answer :)
    But i want to add something. Jarosław Dobrzański wrote that,
    “If you want to edit a file you need to check it out for edit so that it’s listed in Pending Changes window after it’s changed. If you edit a file directly in Visual Studio it checks it out for edit automatically; however, if you make the changes outside Visual Studio (you need to change Read-only property prior to that) and forget to check it out for edit in Visual Studio the file is not listed in Pending Changes window. Consequently, the risk of not including that item while making a check-in increases (I personally experienced that a couple of times….)”. But if he will setup TFS Power Tools, he has doesn’t need to use Visual Studio. At Window Explorer, he can see which files are binded to a source control or he can check-out or check-in. Just install Power Tools

  • Doug

    I think “Updated 15th September 2010″ should be “Updated 15th October 2010″, no?

  • Matt

    Reverting maybe being used to share ideas with other developers on their computer. Not 100%, but Shelving in TFS, maybe what they are trying to achieve with Reverting things that have been committed.

  • JeroenH

    About the checkout/checkin issue: “Although I find it difficult to understand how you know which files you have checked out when you don’t have this”.

    Subversion simply gives you an easy way to determine which files have *changed* against their repository version. This is MUCH more useful than the VSS/TFS counterpart, which only gives a view of “which files I have touched since my last checkin”. Qny edited file stay checked out, even if you (manually) revert your changes (think CTRL-Z). So in the end the “checked out files” list is often not very useful anymore.

    The whole “default to readonly, explicitly check out if you want to edit” model is crippled IMHO.

  • JeroenH

    About the centralized view over who is working on what: I’ll give you that sometimes it comes in handy to know that someone else has a certain file checked out. However, I have nevery missed that feature on any project using svn. I guess it depends on process and preferences, but I have NEVER, EVER worked on a team where this was really an issue. I’ve never met a PM that actually even had time to follow up on that level of detail during the development of a feature. To me this seems more to be a lack of team communication than anything else.

    Another weakness about TFS is the “offline” model. Yes, you can work offline, to some extent. No, it’s not pleasant. Whenever I have to use TFS, and I want to work offline (plane, train), I feel like I’m working “blind”. It’s very difficult to do any significant work without being able to step back now and then, and have a look what has been changed. This is simply impossible with TFS, while svn (but also obviously the new dvcs kids on the block) give you that for free. And for these use cases, I switch to git alongside tfs, which is a pain in itself but there is just no other way.

  • Simon B

    I’m not sure that it is reasonable to say that rolling back change sets in TFS should be a pain because your developers are doing it wrong. Unfortunately this has been a requirement several times for at crucial project points.

    I would argue that it is clearly a missing feature and that making the process byzantine in its complexity is not helpful and if it is intentional, the intention must have been to cause pain.

    When we are dealing with complex builds against non-MS data sources and the only way to verify fully that builds are working is to check in code. With the best will in the world inconsistencies occur between developer and build machines, between development and staging/live database environments. You might say that in TFS 2010 we can simply use gated check-ins. However this is not quite the “magic bullet” it appears. As far as I understand this requires the server to carry out on-the-fly automated merges which even if you’ve done a forward integration beforehand may present you with merge issues.

    Developer do make mistakes, please let TFS admins undo them with the minimum of pain.

  • Jaroslaw Dobrzanski

    Martin,

    To put it straight – great post! I was really glad reading your arguments. I’m quite happy I initiated such informative discussion :)

    It’s my fault I forgot to mention TFS I was writing about was 2008 (need to update my post). I believe everyone agrees ver. 2010 is much better than ver. 2008 (altghough I have only read about the newer). As you said, some of the painful ‘features’ has been fixed there, and there must have been lots of improvements provided as well.

    Power Tools – I definitely need to look into them. As I’ve learnt so far, they can make developers’ life easier :)

    There’s one thing though I’m not totally agree with you – the thing about reverting changes. You said that it’s good it’s difficult to make rollback because it results in developers not checking in crap. In my several years’ experience I’ve never rolled back my changes because they were poor. I don’t even remember if I used the rollback feature at all :) However, I can see a situation where there have been some decisions made a while after the checkin – a pecific piece of work should not be delivered. Rolling back is required there and has nothing to do with quality of developer’s code. Also, if I had to work with lame developers who check in for fun and then revert the changes, I would really consider looking for better team / work place :D

    All in all, I’m really happy you found weaknesses in my post. I’m sure there are a lot of people who are really looking for such constructive comparison.

    Regards,
    Jroslaaw Dobrzanski

  • Egor Kachiguine

    From the perspective of a long time SVN user who’s absolutely cringing at the prospect of switching to TFS, here is what I absolutely hate about the way TFS does things.

    The much talked about Check-in/Check-out/Read-only situation. After living with SVN’s more free form file-based way of doing things this drives me up the wall. I just don’t understand the point I guess. All it does is introduce ridiculous hoops for everyone to jump through, especially if you’re using any other tools than VS. I can understand your point about being able to see what other people are working on, but at the same time just because i’ve modified a file doesn’t mean I’m planning on checking it in, and the fact that a file stays checked out without any modifications makes it hard to rely on that status for anything serious anyhow. I’m always very concerned about what people are checking in, which is often very different than what people are editing.

    Example workflow that the above system makes hard: I like to use PowerGREP for some transformations and replacements, it’s an enormously powerful and fast tool for working with regex. It’s especially useful when project and solution files themselves are involved with the transformations. With SVN, I run the transform, glance at the change list, apply the transform,
    and then study the changes, build, etc. With TFS I have to run the transform, and then manually check out every single file (possibly hundreds) in many directories before I can apply the transform and start validating the changes. It’s an incredibly time-consuming intermediate step for no gain.

    And what’s closely related to the above – the model for using TFS offline. It just sucks, frankly nothing nice to say about it.

    Not being able to treat my source as a directory full of files instead of some mythical sacred server-monitored shrine. Want to work on two different copies of the same branch for some reason? Copy and paste and you’re good to go, commit out of either one, or both. Little things like that can sometimes be immensely useful. Toss the whole thing onto a zip drive and work on another computer, which doesn’t even need SVN – everything will still be fine when you bring it back. Edit with whatever you want, whenever you want. It’s the changes to the files that matter, nothing else.

    Honestly, everything else is sort of details. Branching/merging is a little different, but for the most part those aren’t operations that are done every ten minutes so it’s not a big deal – you can use your own merge tools if desired. But the basic mechanics of using TFS I find deeply irritating.

    SVN has been around for a long time, and Git and the like are on the scene. Developers, especially skilled ones, far and away prefer the control and power that those systems give them to TFS, and industry surveys back me up. They have been used successfully on large and small project of all stripes, and the lack of a check-in/check-out paradigm hasn’t stopped anyone in the least. TFS/VSS developers aren’t chafing at losing those parts of TFS when they jump over to SVN, but everyone complains going the other way around. That says something, I think.

  • Grant

    >> #7 – Switching between branches
    After you update your workspace mappings to a new branch, select “No” on the dialog that asks you if want to “get Latest. Then you can use “tf get /remap” from the command line. If the old & new location share many common files (at the same version), this command will be faster than a normal “tf get”

  • James Wallis Martin

    Although TFS seems to finally be doing things better with TFS 2010 than with 2008 or 2005, I don’t see convincing arguments for a whole development team familiar with Subclipse/Subversion to migrate over to TFS 2010, especially for those working more and more in virtual development teams in the cloud using Private VPNs like Hamachi.

    TFS has always been bulky and slow compared to SVN. Check out/check in of large projects with several hundred files and a couple million lines of code made TFS unusable whereas SVN, albeit slow, was still usable.

    It is amazing that speed and performance are nowhere to be mentioned in the article. Sounds like someone who has been told by Microsoft not to touch on the key weakness in TFS.

  • Lonzo

    Comparing TFS (especially TFS 2010) to SVN is like comparing apples to oranges.

    SVN is a great Source Code control tool, but thats it. It has some hooks for CI and the like which make it a better product.

    TFS is an entire Application Lifecycle Management tool. Besides the Version control and Build capabilities, it Includes Bug and Enhancement Tracking, Intergrated Testing, Requirement definition. All of this information can be associated together, and the reporting features are amazing.

  • lw

    Your comments for #5 are false. Commercial support for Subversion is available from several sources. With TFS you are completely at the mercy of the vendor. With Subversion you can purchase support at many different levels from multiple vendors. There is something for just about everything. On top of paid support there is *also* extensive community support. TFS looses on this one because there are just not as many support options. What does MSDN cost these days. Last I was involved with it was over $1000 per developer per year! Makes sense for some windows developers but you would have to be nuts to use TFS for anything else.

  • Joel

    The big diference between TFS and SVN is that TFS is transactional. So If, for example, I change file name fom “a.src” to “b.src” and another person checks in code for file a.src, they will be merged with my new b.src, or vice-versa.
    This “feature” justifies the way TFS works with source code and why it can’t behave like SVN.
    Anyway, I never had problems with offline TFS, I just checkout files locally and it works just fine.
    Furthermore, I can work with files and folders and just merge my changes to TFS without having to check out files – it will be a bit more dificult because TFS will show a merge dialog.

  • Steven Borg

    To lw. You’re absolutely right. There are a great many version control host companies, there’s a great list at http://www.svnhostingcomparison.com, and many provide full support.

    It’s rough to compare SVN to TFS. It not even apples to oranges, it’s the produce section to an apple. SVN is a great version control tool, but it is only that.

  • EFraim

    @Joel: SVN is also transactional. No, there is no need for the checkout madness just to be transactional. IMHO this is a feature added for some lame PMs who just can’t understand how bad an idea micro-management is.

  • Eric Daigneault

    I just spent 3 hours fighting with TFS Everywhere for a simple commit. Sure it involved several hundred files but all I did was to rename the root folder of a part of the documentation that is checked in with a project.

    I had to just stop trying and fireup Visual Studio, still not done by the way.

    TFS is by far the worst source control system I have ever used. I tried CVS, SVN, Git, Hell even RCCS and VSS performed better at the simple tasks of source control. Never have I lost so much time for the simplest tasks, never Have I seen a system that tries so hard to constantly be in your face.

    I still use it because it is imposed on me but I an seriously thinking of getting my team to switch to git and get an automated process to check things back in TFS.

    The only positive thing I find about TFS and this onle I really like is the workitem system. It works really good, now if I could get the workitem system of TFS and the source control of git I would be in heaven. The SCM part is however so bad that I would gladly prefer post-it on a wall if it meant to stop using TFS as source control.

    Its not the long feature list I am after its just how hard it is to perform the simplest tasks without always having TFS in your face.

  • Christopher Kiszka

    Martin, what is the standard solution for managing external project references in TFS? I use SVN at work and this article (at the bottom) describes using SVN:Externals to map all project references to a single common repository for a single distribution point. I have implemented this at work and for the last couple months it has worked perfect. Now I am spoiled. We are migrating to TFS (which I love) but I do not see a common solution and it may be a deal breaker for me. I do not want “lib” folders in my solutions with all external project references. Fragmentation of each external project reference is inevitable. Can this solution (link below) be implemented in TFS? If not, what is the best alternative? This is big difference (in my opinion) of core functionality to me…
    Thanks in advance!
    http://arcware.net/using-svnexternals-to-manage-project-references/

  • http://blog.hinshelwood.com/ Martin Hinshelwood

    You are right, there is no built in code sharing in TFS. This was deliberately left out of the product as it is always a bad idea to share code between products at the source level. 

    Related Discussion: http://blog.hinshelwood.com/project-of-projects-with-team-foundation-server-2010/ 

    I favour using an internally hosted (or hosted) NuGet server to store and distribute binaries/packages of reusable/shared features.

  • http://www.facebook.com/vitor.canova Vitor Canova Weingaertner

    Visual Studio vNext (11 now a days) will bring TFS Express free of charge.

  • Pingback: TFS v. SVN: 2012 update | Does that answer your question?()

  • Pingback: Managing Schemas And Source Control For Databases | James Serra's Blog()