We have a trunk branch in TFS called Main. From that we create bug/feature branches that should go into their own folder. We had created a folder called Development for this purpose, so when we branched we would specify...
$/TFS/Development/{branchname}
However, we noticed TFS defaulted the path to...
$/TFS/Main-branch
So we thought, we'll just rename Development to Main-branch and life will be good. And we did.
Now the problem is TFS defaults the path to...
$/TFS/Main-branch1
I realize this is severely in the "first world problem" category, but is there a way to change the default path TFS uses? I have found other SO posts that indicate this cannot be done, but I was hoping there was something we could do for TFS2013.
There is no way to change this behavior without code.
It is the same behavior as creating a new folder in windows explorer and it being "NewFolder"...
It's kinda deliberate so you give it a proper name 😊
Related
I am very new to TFS. I have below Structure where I have my entire SOLUTION checked into my TFS online Repository.
Now, we are done with this Feature/Version.
What we want to do is...Leave this version AS IS and create a new Version / Branch out of this. This way if we ever have to go back to this version we can easily go back to it.
But Whenever I right Click on Root and Choose "Branch" Then I get an error that "The Bracnh Already Exists". I would like to name the new Branch "Release 2.0" or Something. But I cant Branch out my current Solution.
Creating New Folder option is Disabled.
Why is it disabled? I have full access to TFS/
You can't branch from the team project root. Reorganize everything to be in a trunk folder (TFVC convention is main, but you can call it whatever you want), and branch off of that.
For what it's worth, branches shouldn't be infinitely branching -- you should branch off of a trunk to do development, then merge back in when development is done. There are numerous reasons why this is the case, but I suggest doing some reading on TFVC branching strategies to find one that's appropriate for your organization.
Another developer has some test files in a new directory in their branch. They're useful to me as well but I'm working in a totally independent, newer branch and he's not likely to merge his branch anytime soon.
I am able to branch his "test-data" directory into my branch but I really want to break the branch association so they're treated as new files in my branch, i.e. so TFS thinks our branches independently added the same new files and we resolve conflicts later since our test data is likely to diverge.
Is there a way to "orphan" the branched files somehow?
You can just get files in TFS using the web access component. Just browse to the folder through the code portion of web access and right click > get as zip.
You can do it from the command line as well but I am not familiar with that. SO has a lot of resources on how to do that from what I have seen.
It is possible to break the branching relationship in TFS and there are many questions on SO on how to do that. But your branch wouldn't initially treat them as 'added' and the history will be in TFS. I would recommend branching just the folder his useful code into your branch and leaving that relationship for posterities sake.
That being said, depending on your situation it may not make sense. If you want to remove the branching relationship immediately, then I don't think you need to use TFS.
Every time I go to do a release I branch my code, and in doing so, it suggests a branch name for me which is just my original branch name with -branch appended to the end. This is annoying, as I put this branch in a separate folder, and have to delete the "-branch" part every time. Is there a way to configure TFS to not do this?
I've read most of the TFS books and ALM rangers guide, and I have never seen this mentioned as a feature, so I am willing to bet no - unless there's an unsupported hack out there, but I would be surprised.
Most people won't have a problem with this because they name their branch after the release. It means 1 less level of nesting, which in TFS 2010 can be a problem with long path names in source control.
I started work a lone developer last year and I found VSS is no longer a good option for source control so I decided to use TFS 2010 instead.
I have had to learn everything from a book - of which there are few.
I am currently creating a new build and in my workspaces I see a have 4. I want to delete one of them and rename another.
However I do not know what the consequences of doing this are. If I delete a workspace, will that remove the associated files under source control? How do I check which files these are? What happens if I change a status from active to cloaked?
As you can see, I am a beginner in all this.
Workspaces are only a mapping from SourceSontrol folders onto your local file system. Also workspace contains information about versions of the files you have locally, so when you hit 'Get Latest Version' only recent changes are sent from server to you, not the whole files. Information on what files are checked out is stored in workspace too, so if you have pending changes in the workspace and delete it then there'll be a bit of a challenge to check these changes in. Renaming of the workspace will not break anything as far as I know.
Article An introduction to TFS Workspaces may be interesting to you.
Like the others have said, the workspace only says what local files you have checked out, and the status, etc. Workspaces are pretty granulal (i.e. per user and per machine) so you could have mutliple workspaces with the same username in the same project. E.g. if you have a copy of Visual Studio at work and one at home, you could have different files checked out and you wouldn't run into any conflicts like you would have in VSS or something based on VSS Like like VSSConnect.
We've had a couple of people leave out project and have had to go in and remove their workspaces after the fact. This hasn't been a big deal in terms of any code losses but if you don't have access to the machine anymore you will have to use the TFS tools.
Try TFS Sidekicks, it provides a nice GUI to manage all the nitty-gritty back-end stuff in TFS
View History on an file in a branch show only changes since the branch. I need to go back further -- like how created the file in the first place. I've also tried Sidekicks, and it doesn't seem to show history from before the branch either.
Short of hunting down the file in the trunk manually, is there a way to view a file's history from the time it was added to now following the path in the branch?
You can upgrade to TFS 2010 for this support natively. The 2010 upgrade is well worth the time for many reasons, this being one of them.
I've used an addon TFS follow branch history the UI is a bit clunky but will get you what you're looking for. It only shows the branched history for a file but won't recurse to all files in a directory.