TFSConfig Recover /ConfigurationDB:tfsserver\SQLR2;Tfs_Configuration /CollectionDB:tfsserver\SQLR2;Tfs_collectionName
пятница, 17 февраля 2012 г.
regex last \ in path replace with file prefix
private
string GenFileName(string
SourceFile)
{
//
last slash(\) replace with slash and file prifix (\TMP_)
return
Regex.Replace(SourceFile, @"\\(?=[^\\]*$)", @"\TMP_");
}
четверг, 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"
пятница, 20 января 2012 г.
TFS Service Development: Set ChangedBy field for workitem
Case: You are developing service, that should change some WorkItems in Team Foundation Server.
Service should set field ChangedBy properly.
collection1.EnsureAuthenticated();
var ims = collection1.GetService<IIdentityManagementService>();
var id = ims.ReadIdentity(IdentitySearchFactor.AccountName, "domain\\username", MembershipQuery.None, ReadIdentityOptions.None);
var collection = new TfsTeamProjectCollection(new Uri("http://tfs:8080/tfs/collection"), id.Descriptor);
-- OR --
WorkItem wi;
...
// Change Work Item
...
// Set ChangedBy Field
wi[CoreField.ChangedBy] = userName;
wi.Save();
Ярлыки:
C#,
ChangedBy,
Programmatically,
TFS,
TFS API,
WorkItem,
WorkItemTracking
Подписаться на:
Сообщения (Atom)