views:

19

answers:

1

Hello, I was recently tasked with creating a branching plan for our project, and part of that involved creating a few feature branches and release branches. I also had to clean up the source control tree so that the branches could be self contained. I basically started with this:

/
  ./src
  ./model
  ./processtemplates
  ./data
  ./otherfolders

I changed the structure to this:

/
  ./trunk
    ./src
    ./model
    ./data
  ./branches
    ./v1
      ./release1
        ./src
        ./model
        ./data
      ./release2

The problem is, I need to create a branch from a specific previous version, but the folder structure has changed, so I can't get that changeset for the /trunk folder to create a branch from. The exact error message I get is: "No matching items found in $/ at the specified version."

What's the best way to do this? I have though of creating a branch from the latest changeset and reverting all of the changes back to the older changeset. I was hoping there was an easier way.

+1  A: 

Renames and deletes are dangerous territory in TFS 2008. You'll probably have to go to the command-line to do this. Take a look at your history to figure out the changeset from which you want to branch, then do the following at the command line:

mkdir c:\BranchFolder
cd c:\BranchFolder
tf.exe workspace /new /s:http://tfs:8080 BranchWorkspace
tf.exe workfold /map:"$/","C:\BranchFolder"
tf.exe branch "$/" "$/branches/v999" /version:Cxxxxxx /noget /noprompt

Validate and check in.

tf.exe workspace /delete BranchWorkspace

replace v999 with whatever folder you want to branch into, and change xxxxxx to the appropriate changeset number.

As always-- when you are working in these kinds of areas where you aren't quite sure what the results are going to be, check your work before checking in.

Robaticus
@Robaticus Thanks for the response, but unfortunately I still have the same problem. The /trunk folder doesn't exist in the changeset I want.
Zachary Yates
It shouldn't need to. What you might need to do is append the version number to the end of the "$/" (such as "$/;xxxxxx") this would tell it to use the version at that particular revision as a starting point.
Robaticus