Показаны сообщения с ярлыком Version Control Server. Показать все сообщения
Показаны сообщения с ярлыком Version Control Server. Показать все сообщения

пятница, 17 февраля 2012 г.

TFS recover TFS Collection DB command

TFSConfig Recover /ConfigurationDB:tfsserver\SQLR2;Tfs_Configuration /CollectionDB:tfsserver\SQLR2;Tfs_collectionName

четверг, 26 января 2012 г.

TFS TEE Changeset Diff Command Line Script


#!/bin/bash
# 1 - changeset number
clear

changeset=$1
changeset_m1=$((changeset-1))

echo "============================="
echo "changeset:"$changeset
echo "changeset-1:"$changeset_m1
echo "============================="

# 'tf -profile:max@max-desktop '$changeset
tf changeset -profile:max@max-desktop $changeset

regex=".*edit.*"
regexpath="\\$.*"

changesetcmd="tf changeset -profile:max@max-desktop "$changeset

echo "CMD:"$changesetcmd

echo "********************"

isItems="false"
tf changeset -profile:max@max-desktop $changeset | while read line
do
    if [ "$line" = "" ]; then
isItems="false"
    fi
    if [ "$isItems" = "true" ]; then

echo $line
if [[ $line =~ $regex ]]; then

[[ $line =~ $regexpath ]]
path="${BASH_REMATCH[0]}"
#echo "PATH:${BASH_REMATCH[0]}"
#echo "EDIT:"$line
echo "DIFF----"$path"---->"
tf diff "$path;C$changeset" "$path;C$changeset_m1" -workspace:max-desktop -profile:max@max-desktop
echo "<-DIFF"

fi

    fi  
    if [ "$line" = "Items:" ]; then
isItems="true"
    fi
done
echo "********************"
echo "finish"

среда, 24 августа 2011 г.

How to convert TFS folder to branch programmatically by TFS API (Convert to Branch operation in VS2010))


How to convert TFS folder to branch programmatically by TFS API (Convert to Branch operation in VS2010))

First you need create instance of VersionControlServer object. Then use CreateBranchObject method. serverTrunkPath="C:\myWorkspace\trunk" - target folder you want to make branch.

versionControlServer.CreateBranchObject(new BranchProperties(new ItemIdentifier(serverTrunkPath)));

четверг, 3 февраля 2011 г.

TFS: To make merge from stablility or build Label to trunk

For example, you have code labelled "Stable_1" in development branch and you need to merge the code to trunk.

string SourceLabel = "Stable_1"
GetStatus status = workspace.Merge
    (DevelopmentPath, TrunkPath,
    null, VersionSpec.ParseSingleSpec( "L" + SourceLabel, null ),
    LockLevel.CheckOut, RecursionType.Full, MergeOptions.None);