SCM
A TF Command file example
Submitted by pete on Thu, 2009-03-26 18:44Put the following into a script.tfc file called for example.
cd %3
rem Change the current directory from whatever it is to the project folder.
workspace /new /s:TeamServer2 /user:UNO\juan %1BuildWS%2
rem Create a new workspace on the TeamServer2 server as user UNO\juan.
rem Assign a name to the workspace that concatenates the first command line argument (%1) + "BuildWS" + the second command line argument (%2)
get %1 /recursive
rem retrieve the latest version of the first command line argument.
branch %1 %1V%2
checkin /comment:”This is build v%2 of %1”
label %1Build%2 /category:builds /comment:”%1 Build %2” %1V%2
workspace /delete %1BuildWorkspace%2
Keeping labels when the retention policy deletes builds.
Submitted by pete on Thu, 2009-03-26 18:29If you setup your TFS build server to delete old builds you might not know TFS deletes the label for that build as well. If you one of those old builds you want to have the label you used to build it. Many ways to deal with this issue. Changing the AT web.config is how to change it for all builds. The builds will be deleted, but the labels will remain.
From: http://social.msdn.microsoft.com/forums/en-US/tfsbuild/thread/a08bf751-4...
"The build admin can add a flag to the Web.config file on the Application Tier to specify that labels should not be deleted. Here is an example of what that line in the web.config file would look like:
"
<add key="PreserveLabelsOnBuildDeletion" value="True"/>
Good article defining Software Configuration Management
Submitted by luke on Wed, 2008-10-15 22:27http://www.informit.com/articles/article.aspx?p=390813
"What Is Software Configuration Management?
* By Tom J. Milligan and David E. Bellagio
* Jul 15, 2005
* Sample Chapter is provided courtesy of Addison-Wesley Professional"
Makes a better list than most of best practices.
Xcode prec-compiled headers cache and branching
Submitted by albert on Sat, 2008-10-11 12:59http://www.stevestreeting.com/2007/09/19/branches-and-precompiled-header... shows why we should configure each project to have a different path than the defaults.
Branching work in progress
Submitted by luke on Wed, 2008-07-09 23:20Perforce Knowledge Base: Branching work in progress shows how you branch work in progress.
Comments are mine. The commands are from Perforce with no known edits.
When I see strings hard coded, I want to abstract them into variables.
Maybe,
VCFOLDER=//depot
PROJECT=/project
LABELTAG=home
STREAMIN= < could be main/qa/QA a defined branch point.
STREAMOUT=work-project
LOCALIN=c:\app-src\project
LOCALOUT=c:\app-src\work-project
So this
p4 integ -v //depot/project/...@home //depot/work-project/...
xcopy/s/i $LOCALIN $LOCALOUT c:\app-src\work-project
would be
p4 integ -v $VCFOLDER$PROJECT...@$LABELTAG $VCFOLDER$STREAMOUT...
xcopy/s/i c:\app-src\project c:\app-src\work-project
REM Notice the use of the @home.
REM work-project is a new VCS folder.
p4 integ -v //depot/project/...@home //depot/work-project/...
Setting up Subversion
Submitted by albert on Sun, 2008-06-08 08:36http://lijinjoseji.wordpress.com/2008/03/24/installing-subversion-just-f... show 7 steps to setting up subversion. Does it work?
Perforce
Submitted by phecht on Mon, 2007-11-19 18:13Cost of Ownership:
How much does cost to use Perforce? That depends on how much time you current use with version control.
If used it 100%, which is impossible it would cost 36 cents/hour the first year and only 8 cents/hour after that.
Where to get it:
http://www.perforce.com/perforce/loadprog.html is the link to download the server and clients. You don't pay anything to start using Perforce. When you start using it with more then 2 people, you will have to get an evaluation license from Perforce.
wget http://perforce.com/perforce/doc.081/manuals/cmdref/cmdref.pdf
Mac Notes: http://kb.perforce.com/HardwareOsNe..rkReference/OperatingSystems/Mac/Pe...
CVS Page
Submitted by albert on Tue, 2007-06-12 11:36CVS is a free and widely used Source Code Management (SCM) application.
Introduction
This will be filled out as time permits.
Tools:
http://www.bonevich.com/boneclipse-master/boneclipse-cvsgrapher/index.html
http://statcvs.sourceforge.net/
http://cvsplot.sourceforge.net/
http://sourceforge.net/projects/lxr
http://sourceforge.net/project/showfiles.php?group_id=95827
Mac CVL:
http://www.sente.ch/software/cvl/
Mantis Integration: http://www.mantisbt.org/bugs/view.php?id=3371
Handy tips
To use "CVS -F ...
You need to have unix line endings on the file!
Handy scripts
If you want to list all tags for a file you can do something like this on a standard unix shell:
cvs -z9 -q rlog -h $fileName | sed -n -e '/^\W.*[A-Z|a-z]/p' | sed -e 's/:.*$//' | sed -e 's/\W*//'
If you want to see what items that are not "Up-to-Date" you can do something like this:
cvs status | grep "Status:" | grep -v "Up-to-date"
It will pull all the "Status:" lines of the output and then show only the ones that are not "Up-to-date".
For windows you will have to replace the grep with findstr such as this:
cvs status | findstr "Status:" | findstr /v "Up-to-date"
