2012-08-23 24 views

cevap

7

Bu, 2010 veya 2012 TFS nesne modelleri ile çalışıyor olsaydınız, bunu nasıl yapacaksınız. Herhangi bir sorunuz olursa haberim olsun.

// Get a reference to yourTeam Foundation Server. 
TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri("http://<yourserver>:8080/tfs/<yourcollection> ")); 

// Get a reference to Version Control. 
VersionControlServer versionControl = tpc.GetService<VersionControlServer>(); 

Workspace workspace = versionControl.GetWorkspace("<local path to your workspace>"); 

string sourceBranch = "$/<sourceBranch>"; 
string targetBranch = "$/<targetBranch>"; 
VersionSpec changesetToMerge = new ChangesetVersionSpec(<your changeset here>); 

// actually pend the merge 
workspace.Merge(sourceBranch, targetBranch, changesetToMerge, changesetToMerge); 

// check in the merge 
workspace.CheckIn(workspace.GetPendingChanges(), "your comment"); 
İlgili konular