简体   繁体   中英

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 (ie, 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.

SVN can do both.

  1. Shared source control with continuous integration

"Shared source control" is just what SVN does.

SVN itself does not do continuous integration (CI), but there are many CI servers that integrate well with SVN (CruiseControl, CruiseControl.NET, Jenkins, Hudson...). In the OS community the motto is often "do one thing, but do it well", thus SVN does not bundle CI functionality, but just integrates with whatever CI server you use.

  1. The ability to check in incremental changes that may or may not build (ie, 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).

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM