2

From the source-control perspective, what are the real differences between TFS and SVN for the user ?

For example: On SVN we have the basic commands:

  • Check out
  • Export
  • Commit
  • Update
  • Delete
  • Revert

And each file has its own revision number.

Does TFS have those commands as well ? Each file has its own revision number ?

Please answer only from source-control perspective. Bug tracking, ALM and pricing are not at stake on this question.

Machado
  • 741
  • 2
  • 6
  • 19
  • 1
    In SVN, the repository has a revision number, not each file. – Rob Goodwin Nov 18 '11 at 19:46
  • What do you mean by each file has its own revision number? In SVN all files in the same commit shares the same revision number. – Albin Sunnanbo Nov 18 '11 at 19:46
  • @Rob, Albin nailed it better than me: Each group of files commited together has the same revision number. If you commit a single file, it will have a revision number assigned to it. – Machado Nov 21 '11 at 12:46

2 Answers2

2

THe main difference in my opinion is, that Subversion supports (only) a real optimistic locking strategy, that means you normally work in parallel with each other, and the second (and later ones) have to merge their changes to the ones of the others.

In TFS you have to first checkout, that means, reserve the file for your changes, to do any work. This leads to a more pessimistic locking strategy.

And yes, one big difference is, that working offline is not an option with TFS, and perfectly supported by Subversion.

TFS has in my opinion better support for branching and merging (at least the UI helps a lot here).

TFS and Subversion have different terms with similar meanings when committing / checking in. (The following comes from a co-worker which has worked with both tools.)

Def: Revision: An svn commit operation publishes changes to any number of files and directories as a single atomic transaction -> http://svnbook.red-bean.com/

Def: ChangeSet: A changeset is a logical container in which Team Foundation stores everything related to a single check-in operation, specifically: file and folder revisions -> http://msdn.microsoft.com/en-us/library/ms181408%28v=vs.80%29.aspx

During CheckIn every File is associated with the CheckIn Number (counted up as in Subversion). If you browse the history of a folder / file you can see the history as a table with columns: changeSet Numbers / date / comment A nice feature from my point of view is the @Annotate function. With this function you can see the changesets of one file on LOC level (line 2-5 was changed by changset 2 "Adding logging, line 10 was changed by changset 5 "Check for null values" ;-) )

mliebelt
  • 15,345
  • 7
  • 55
  • 92
  • +1, thanks, this mandatory check-out/reserve before editing a file plus NO offline editing is the kind of difference I'd like do know. But do the files have revision numbers as well, like SVN ? Can I query the TFS somehow to determine the current number of a file ? – Machado Nov 21 '11 at 12:47
  • I have added information to the similar terms revision and change set. – mliebelt Nov 21 '11 at 14:01
  • "In TFS you have to first checkout, that means, reserve the file for your changes, to do any work. This leads to a more pessimistic locking strategy." - this does not prevent multiple people from editing the same file, except for binary files, which can't be merged anyway "And yes, one big difference is, that working offline is not an option with TFS, and perfectly supported by Subversion." - false in 2008+: http://stackoverflow.com/questions/313653/work-offline-in-team-foundation-server – Mark Sowul Mar 28 '12 at 18:33
0

The commands you listed are supported by ALL source control systems as they are the absolute minimum any SC must have to even be considered functional.

There are really only a couple things to consider when deciding between them, most of which were explicitly excluded in your question...

Point is, if you boiled TFS down to just a source control system then the differences are negligible. FYI, I've used both extensively (over 5 years each) and currently only use TFS due to the additional features that are wrapped up into a single package.

NotMe
  • 87,343
  • 27
  • 171
  • 245