views:

159

answers:

3
+1  Q: 

TFS and Subversion

I have the following goals:

  1. Shared source control with continuous integration
  2. The ability to check in incremental changes that may or may not build (i.e., breaking changes) without affecting other team members
  3. The ability, without days of work, to get a report of the incremental changes checked in (not a report of the FACT that a check in was made, but an actual diff report - late edit: I now know this to be a "unified diff")

One possible solution is to use TFS as the primary source control with continuous integration and then use personal subversion implementations on top of that for tracking and checking in incremental changes that could break the build.

I understand TFS has the shelve option, but I don't think TFS has a nice summary report of check-in diffs (see below), nor is there a way that I know of to easily see a diff for a shelveset.

So, the questions are:

  1. Does anyone know how to get an SVN report of check-ins with something like this for each file (or, for that matter, how to get something like this out of TFS):
        SetErrorMessage("You have entered an invalid concentration.");
        return;
      }
-     c.Concentration = decimal.Parse(concentration);
+     decimal num = 0;
+     if (decimal.TryParse(concentration, out num))
+        c.Concentration = decimal.Parse(concentration);
+     else
+     {
+        SetErrorMessage("Invalid concentraion.");
+        return;
+     }
+
      c.UnitOfMeasure = units;

  1. Does anyone have experience with overlapping source control?

  2. And finally, does anyone know how these goals could be accomplished using only TFS or only SVN (or something else)?

Thanks for any input.

+1  A: 

SVN itself could easily generate a diff like this for you. The svn diff utility just needs two revisions which could be got from svn log or could be stored via some other mechanism. One option would be to tag some commit near the end of the day on friday then diff from that tag up to HEAD. The other option would be to grep the svn log for dates but that's a little hacky.

I've not used TFS so I apologize that I didn't work that in.

Chuck Vose
I'm not nearly fluent enough in SVN to know how to revise the svn diff utility as you describe - would be great if you could describe that a bit. But in any case, thanks for the suggestion.
sydneyos
it's just svn diff -rHEAD:101 where 101 is whatever revision you want. Or if you make a tag you can put that in the place of 101 and you're good to go. The low tech version of this is just to record what your last revision is on Fridays and diff between them. So if last friday is 101 and this friday is 150 then you would just svn diff -r150:101. That's all you need to do :)
Chuck Vose
Thanks, Chuck! that helps a lot
sydneyos
A: 

Take a look at the documentation for svn diff. It describes how to use it and the different parameters it accepts.

Michael Hackner
+3  A: 

SVN can do both.

  1. Shared source control with continuous integration

That is just what SVN does.

  1. The ability to check in incremental changes that may or may not build (i.e., breaking changes) without affecting other team members

This is commonly done using branches. Basically, you create a (virtual) copy of the source tree, then commit your changes there, separate from the main repository tree (the so-called trunk). When you're satisfied, you integrate ("merge") the changes from your branch into the trunk.

Alternatively, you could work such that you code always builds. I would actually consider that a better solution :-). Still, branches will be necessary for disruptive changes, or changes that need thorough testing.

  1. The ability, without days of work, to get a report of the incremental changes checked in (not a report of the FACT that a check in was made, but an actual diff report - late edit: I now know this to be a "unified diff")

The list of branches (which usually live all in one directory) will give you the list of various changes that are not yet in the trunk. For each branch, you can then use svn diff to get a diff to the trunk (calculate the diff between the HEAD in the branch and the HEAD in trunk).

sleske