index > Team Foundation Server - Version Control > rollback to a label?

rollback to a label?


Hi All

How can I rollback to a Label??

I see that tfpt.exe just lets you rollback a changeset. Also, It just lets me select 1 changeset at 1 time. What if, I wanna rollback 3 changesets at 1 time?

We are used to labeling a release. The tech leads may ask me to rollback to a specific label if something screws up in a branch. How can I get around with this?

Thanks.
G S
  1. Get Specific Version back to that label
  2. Pend an edit on all the files that were replaced
  3. Attempt to checkin
  4. Resolve as AcceptYours ("discard server changes")
  5. Checkin
Richard Berg MSFT
1)By the scond step u mean....
Check out the file and check back in. Is it Right?

2)So u mean to say that I have to go thru the above steps for all the 50-60 or more files if i were needed a previous label code for that branch?????
This doesn't sound fun at all.
G S
The best way to do Step 2 is with a script. To enumerate the items you need to checkout, either parse the output of Step 1 or use tf labels /f:detailed
Richard Berg MSFT
Thats a good idea to check-out the whole branch and then move from there.
But now what irritates is that i have to resolve conflicts on 50 files one by one. UI doesn't give me an option to discard the server changes all at once. This is not comfortable. or maybe i am asking too much :). I guess i can live with it. These kinda rollbacks are not often.

But I'm still curious about the script syntax u talked about. I'd appreciate if u give li'l more detail about it.
Thanks.
G S
After you get the list of files, you'd write out a new file called "BulkCheckout.tfc" that looked like:

checkout file1.txt
checkout folder\file2.txt
checkout folder333\file333.txt
etc.

Then run tf @BulkCheckout.tfc
Richard Berg MSFT
Richard
Thanks for quick replies.
u r right, we can select all the files and 'discard server changes' all at once......my bad.

Right now, I just need to figure out things in TFS and see if there is anything that doesn't suit out IT process. Rollback to a label works for me using the UI.

I appreciate u forwarding the link and suggestion for the command line syntax......maybe it will help others who check this thread.
G S
reply 7

You can use google to search for other answers

 

More Articles

TFS Proxy returns error in the middle of GetLatest
Merged directories: How to? Impossible?
Project heirarchies in TFS
TFS and Enterprise Architect 6.1
Team Foundation Server SCC Api
XMLSPY and TFS
WScript.Exec + tf get /all hangs?
Merge/Checkout scenario
Replace TFVC with another source control
VC programming help needed
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Problem with Visual Interdev and VB6 wit…
Problem moving source from one server to…
I can't believe I miss SourceSafe!
VssConverter problem
VB: Edit and Continue
branch on a label
View History Errors
Build checks out and locks local project…
Checkin Comments
Managing source tree changes with TFS...
Substitution of text during checkin or c…
Web Project: Projects have recently been…
View not checked out but modified files
File content mash-up
URGENT: Error when merging changes after…

Hot Articles

Re-sizing and Sorting Columns in Work It…
Sql Server Error When Performing Merge
Time Stamp in Source Control Explorer
Few questions on merging through the API
"retiring" or locking a branch…
Check-in policy errors / suggestions / q…
One big team project, or Eight small ones?
TFS MSSCCI Provider Final fails to install
PendDelete usage and differences between…
Project files of our solution are automa…
Pre-migrate history not available to som…
Problems moving TFS from Domain A to Dom…
How do I prevent unwanted updates to my …
Branching
Shelveset manipulation

Recommend Articles

Scheduling a merge operation
Changeset question
TFS source control storage area
team system version control for non micr…
Re: Check-out not getting latest (RTM)
Rollback Changeset
Source Control - default working Path
How to extract list of changed files
Things I miss from Source Safe... any su…
Perforce TS convertor
Problem getting source from Foundation S…
Few questions on merging through the API
History information doesn't show up afte…
Check out source code from Solution Expl…
Evaluating Check-in Policies during Shel…