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 |
- Get Specific Version back to that label
- Pend an edit on all the files that were replaced
- Attempt to checkin
- Resolve as AcceptYours ("discard server changes")
- 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 |