none
TFS - reinstate old cut of code as current.

    Question

  • Hi, wonder if somebody can give us some advice of how best to solve our problem.

    We would like to know how best we can "remove" changesets from our project. There would be at least 3-4 months worth of changes which we would like to remove (also have that cut labled). We would also like to copy the latest code to an alternate project/branch/directory/something just to have access to it in some way or another. We have build processes in place and would like to preserve our dev and build environments as far as possible. Hindsight - we should have created branches and restricted use of labels - but we certianly did not know the product at that time and did not know that the new dev would be canned.

    Thanks in advance.

    Friday, March 30, 2012 2:20 PM

Answers

All replies

  •  how best we can "remove" changesets from our project. There would be at least 3-4 months worth of changes which we would like to remove (also have that cut labled).

    A changeset is a permanent part of the history of your version-controlled items and cannot be undone or removed. However, you can use the tf rollback command to negate the effect of one or more changesets to one or more items

    http://msdn.microsoft.com/en-us/library/dd380776.aspx


    We would also like to copy the latest code to an alternate project/branch/directory/something just to have access to it in some way or another. We have build processes in place and would like to preserve our dev and build environments as far as possible. Hindsight - we should have created branches and restricted use of labels - but we certianly did not know the product at that time and did not know that the new dev would be canned.

    Thanks in advance.

    Sorry, it's not clear for me, what exactly you need? But I can see that you talk about branch and merge so you can see my answer on the following thread:

    http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/c887dee1-83c6-43a9-83e3-e19953ed6ffc


    We are volunteers, if the reply help you mark it as your answer. thanks!!

    Blog: http://mohamedradwan.wordpress.com

     


    Friday, March 30, 2012 3:29 PM
  • Hi Alice,

    Thank you for your post.

    About changeset, Radwan has post some information about it. You can  use a Team Foundation version control changeset to store and find information about a single check-in operation. When you check in your pending changes, a changeset is created that stores information about file and folder revisions, links to related work items, check-in notes, a comment, policy compliance, and system metadata such as owner name and date/time of check in. For detail information, you can refer to http://msdn.microsoft.com/en-us/library/ms181408(v=vs.100).aspx.

    I am sorry that I still feel confused with your description. Would you please kindly offer me more information how to reproduce your issue?

    Best reagrds,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, April 03, 2012 8:11 AM
    Moderator
  • Hi Lily/Radwan, thank you very much for your reply and information. Our situation arose as follows, our product :  say version 1.x, was deployed at clients a year ago - developement and deployment all happened on the same Team Project and luckily the version 1.x was labeled. Subsequently, a whole lot of changes were introduced  to the core components of the project (new version of our framework which is not backward compatible). We do not want to deploy these changes to clients for a number of reasons and want to reinstate version 1.x to be the "current" version in TFS but find a way to preserve the "new" work somewhere out of harms way (source, history etc).

    From the info I see that one can create a new Team Project as a branch of an existing Team Project. Wondering if i can use that to preserve the unwanted "new" work and then "force" check in my labeled version.

    Best regards

    Tuesday, April 03, 2012 9:23 AM
  • you can create a branch from the old version based on the label and continue working from there. that way the newly developed code remains in the old branch and you can refine the 'old' version in the new branch.

    you can them use folde3 security and remove the checkout permissions from the unwanted new version to prevent people from work8ng there.

     

    My blog: blog.jessehouwing.nl

    Thursday, April 05, 2012 7:42 PM
  • Hi AliceVr,

    As people have mentioned, you could branch to a directory or to a new project.  This is the most common way people use to move to a new version (Simply branching to a new folder within the same project). As your original question was about getting rid of history or removing changesets from your project, one option for that is to use tf destroy, and specify the versionspec and stop to destroy individual changeset-http://msdn.microsoft.com/en-us/library/bb386005(v=vs.90).aspx

    Thanks,

    Brad


    This posting is provided "AS IS" with no warranties, and confers no rights

    Tuesday, April 10, 2012 6:48 AM
  • Hi - thank you for all your answers, just one more on this topic  -  can I rename a Team Project? Then i would rename the current Project to "X New" and then branch (using the label) to create the Team project as "X". That would suit our requirements exactly.

    Thank you in advance.

    A

    Tuesday, April 10, 2012 7:35 AM
  • Hi AliceVR,

    Unfortunately, you can not rename a Team Project.

    Brad


    This posting is provided "AS IS" with no warranties, and confers no rights

    Tuesday, April 10, 2012 5:21 PM