How do you branch by TFS Collection - visual-studio-2010

Thanks for your help in advance.
I was wondering if it was possible to branch by collection in TFS2010?
Basically, I have a collection called "ReleaseTesting", and when I right click on it I am able to see the menu for "Branching and Merging", however it is greyed out.
So, is it possible to branch by collection? Just by the fact that the menu is there, leads me to believe that this is true.

If you mean branch from one collection to another then no it's not possible (or branch from the root of a collection to create another). Behind the scenes collections in TFS are seperate databases and cannot share any artefacts (code, work items, builds etc).
If you need to move code between collections and maintain history the you could use the TFS integration platform

Hmm, I think you are on the right track. Remember that TFS has it's own permissions. So if something is greyed out, it could be because you don't have permissions.
For example, the new folder icon for me is greyed out sometimes, depending where in the folder tree I am.
Standard answer- contact you administration, i know that is not very helpful though.

Related

Remove recent items in the Xcode's CheckOut window

is there a way to clean recent items in the checkout dialog box ("source control" -> "check out...") on Xcode 7 ?
It seems that you will need to find com.apple.dt.XCode.plist located in your Library/Preferences directory.
Search for IDESourceControlRecentsFavoritesRepositoriesUserDefaultsKey and there should be a list of items under that key. Unwanted repositories can be deleted from it and it will be reflected the next time XCode is restarted.
Such a difficult task for something to trivial. But hey, at least it is possible to do this. Cheers.
That window lists both:
Projects/Workspaces that Xcode is tracking (and thus maintaining derived data for, like build products)
Repositories that Xcode is holding login credentials for
For the first one, look in the Projects window. You can clear things out of there, at the cost of losing the derived data associated with them.
For the second, look in the Accounts pane of Xcode Preferences.
Once you've deleted things from both places, they shouldn't show up in the Check Out window anymore. (If they do, I'd call that a bug... and file it with Apple.)

How do I hide projects?

I have a large VS solution, but I'm only working on two different projects, but need all the projects loaded to do the build. I cannot change the structure of the solution.
Is it possible to hide the projects I'm not working on? They would still build, and be accessible when needed, but I'm getting tired of scrolling up and down in Solution Explorer.
If it's not possible, but work-arounds are available?
You can right click a project --> "New solution explorer view" and then you can play with the windowconfiguration like this:
I do it like this:
Right click solution | Add New Solution Folder
Then I just create some dummy folder. I drag all the projects and anything else I do not want to see into that folder.
Then right click the folder | Hide Folder
Note: If you work in a team environment, do not check in the solution file.
It works for me so hopefully it will work for you as well.
If only I could create a folder and throw some of the people I can think of into it and do the above trick...
for anyone looking for a way to do this, take a look at the "filtered solutions" feature of vs2019. worked pretty good for me and my team. enjoy.
https://learn.microsoft.com/en-us/visualstudio/ide/filtered-solutions?view=vs-2019

When you make edits to a file within a project using AnkhSVN, can this be reflected at the project level?

When I make edits to file, TortoiseSVN will show an indication on the folder that file belongs to that there are changes pending to child items. AnkhSVN only shows (red tick) changes to a project when files are added/removed (because the actual content of the project file in this case has changed)
Can you make ankh give any indication at the project level that child items have been edited?
Unfortunately, no. Ankh only shows an indication on modified files, whereas TortoiseSVN can traverse folders recursively and mark those with changed files within them.
If you desperately need this feature, you can try out VisualSVN plugin. It tries to mimic TortoiseSVN behaviour as close as possible. In fact, it uses TSVN dialogs for operations such as Commit or Update, for instance. When you modify a file within a project, it highlights the file, the project this file belongs to, as well as the solution node in the Solution Explorer.
Unfortunately, it's not free (US $49 per seat), but IMO it is worth its price.
The recommended way to see what changed globally in AnkhSVN is the 'Pending Changes' toolwindow. This shows you all interesting files in a single view and allows you to operate on them easily.
You can open the toolwindow via View->Pending Changes.
Try this:
Right Click the File -> Subversion -> Lock
This places a lock on the file so that others cannot edit it.
When you commit, it should unlock the file.
If it does not, Follow the same steps and select Unlock.
Edit: I use AnkhSVN for my svn but it's just me that uses it. If a corporate environment I mainly use TFS which does the same thing (lock/unlock) but it does not allow others to check out.

TFS how can I group my files in pending changes window?

If I'm working on lots of things at a time I would like to group the files that I've changed into 'change lists' similar to TortoiseSVN change list feature. Is there a way to do this in TFS?
Is there a way to do this in TFS?
Not in the way linked to (as far sa I can tell).
You can use "Shelvesets" to save ongoing changes (and, optionally, remove them as pending changes in your workspace) which allows saving your state when switching to work on something else.

How do we keep track of our working copy's branch?

Are there any good techniques to help us know which branch (or trunk) our working copy is from? We recently converted to Subversion and we're using release branches. I had two developers commit changes to the release branch that should have been committed to the trunk. We're using CI (TeamCity), so I recognized the problem right away and was able to revert the changes but I'd like to prevent it from happening again. From within Visual Studio, especially, it's easy to make a mistake and commit to the wrong branch.
We're using TortoiseSVN and AnkhSVN.
Edited to add:
Just to clarify, I'm looking for a method to prevent careless mistakes, I already know how to find this information. There are two careless mistakes I'm trying to prevent:
Doing work on the wrong branch. If this is caught before commit, the developer has to merge the changes back into the correct branch.
Committing to the wrong branch. This combines the pain of point 1 with having to revert the changes in Subversion.
Edited to add: We just made the switch to the VisualSVN VS plugin and it has a toolbar that displays the path of the current working copy. I really like the reassurance that I'm working on the right branch.
Perhaps you should consider using a pre-commit hook: http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html
Then you could do something like only approve checkins that have 'for release' in the comments for that particular branch or something like that and return an error message otherwise.
In AnkhSVN (in Visual Studio) the project url of your working copy is from is displayed in the 'Working on' field of the Pending Changes Window (View->Pending Changes).
The url of a file/folder is also displayed in the Visual Studio project window when you select a file in the Pending Changes Window or Working Copy Explorer (and in many cases even when you select a file in the Solution explorer; but this depends on the project type).
[Update: I just added AnkhSVN issue #581 for extension of the commit dialog.]
Tortoise SVN adds columns to the Windows Explorer view. In "Details" mode, right-click on column headers to get a list of available columns, at the bottom, select "More" to get a dialog of all available column types.
SVN short URL should quickly show you what the location is in the repository.
But this doesn't appear to work under vista ...
Right click the folder, move to the subversion tab, there it says the project it's linked to.
Also, in the commit dialog, it says so at the top of the dialog.
From the working directory:
svn info
URL will contain the branch your working directory points to.
<EDIT> Seeing how many people dislike the command line, the closes thing I found from TortoiseSVN is the "repo browser" which seems to use the selected branch as your starting path in the repo. </EDIT>
Avoid re-using working copies. If you're working on 2 places in the repository, have 2 working copies, named appropriately, like: Project-trunk, Project-release.
Here is a simple idea which might help:
Create an empty text file named "branch_XX" (or any name) and add it to your branch.
commit this and then when you switch to the trunk, the file will not appear in the solution explorer.
It sounds stupid... but it does the trick.
I really hope they will add something that might mark what branch we are using without going to other windows.
In AnkhSVN (in Visual Studio), right click on your project/solution, then Source Control -> Subversion -> Select in Repository Explorer. It will automatically select the branch you're currently working on (i.e. the branch you're switched to).
I don't think that the accepted answer for AnkhSVN works for Projects, since I always see the same URL in the "Pending Changes" even after I use the option "Switch Project" on a project.

Resources