Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » VSTF » Source Control   (RSS)

How to: Query all labels on a folder recursively?

To do this, you can't call query labels with a wildcard character, you need to do the following: - Get all items blow $/Dir1 using GetItems - Loop through them calling QueryLabels on each one. Here's a code snippet: VersionControlServer sc = tfs.GetService<
Posted by mohamedg | 3 Comments
Filed under: , ,

How to: Move a shelveset to another branch?

A very handy power tool is tfpt unshelve. It’s capable of migrating a shelveset from a branch to another, it does that by performing a baseless merge, so you will need to resolve the conflicts produced. The syntax of the command looks like the following:
Posted by mohamedg | 6 Comments
Filed under: , ,

How to: Diff shelved files?

You can run: tf diff /shelveset:shelvesetName;DOMAIN\ownerUserName Please note that this will diff the shelved changes against the unmodified version, not necessarily the latest version, just like what the you get from clicking compare in the shelveset
Posted by mohamedg | 1 Comments
Filed under: , ,

How to: List changesets between two labeled versions?

You can achieve that behavior by running: tf hist rootItemSpec /r /version:LstartLabel~LendLabel Here’s my scenario: tf hist /i File.cs Changeset Change User Date Comment --------- -------------------------- ------------- ---------- -------- 65 edit mohamedg
Posted by mohamedg | 2 Comments
Filed under: , ,

How to: View history of an item across branches?

You can use tfpt history /followbranches to follow the history of an item across branches. We are looking into supporting this in the history dialog in the next version . You can see which versions are ported over during the merge operation if you use
Posted by mohamedg | 1 Comments
Filed under: ,

How to: Switch between TFS and VSS in old IDEs?

If you have an IDE that uses the MSSCCI provider, like VS 2003 or VB6, and you want to switch between TFS and VSS because you have projects on both systems, you will have to change the provider every time you switch. The thing is that setting is stored
Posted by mohamedg | 1 Comments
Filed under: , ,

How to: Copy workspace mappings?

A common scenario that you may see is the need to share/sync workspace mappings amongst team members. A developer adds a new dependency in a certain project and changes his/her mappings to get this library, and everyone else in the team now needs to do
Posted by mohamedg | 2 Comments
Filed under: , ,

How to: Switch branches in a workspace without getting all the files of the new branch?

One of the new features added in VSTF 2008 SP1 is that you can switch to another branch in your workspace and you don’t need to download all the files of the new branch. TFS will only download the files that differ in the new branch, if you use tf get
Posted by mohamedg | 1 Comments
Filed under: , ,

How to: Move your workspace to another drive?

A common problem occurs when the drive that contains your workspaces runs out of disk space, or when you find yourself in a situation that you have to move your workspace to another drive. This might get tricky because your workspace mappings are stored
Posted by mohamedg | 0 Comments
Filed under: , ,

How to get list of changes in a shelveset programmatically?

In a previous post , we used the command-line to list the changes in a shelveset. This time we are going to use an API to get the changes by calling: VersionControlServer.QueryShelvedChanges You have to be a valid user that can connect to Version Control,
Posted by mohamedg | 1 Comments
Filed under: , ,

Pitfalls of baseless merge

A previous post was dedicated to show the benefits of a baseless merge, this one shows the pitfalls: When you perform a baseless merge, renames and deletes will not be merged If you get conflicts, the usual 3-way merge is not possible, you will have to
Posted by mohamedg | 2 Comments
Filed under: ,

How to: List changes in a shelveset?

When you run tf shelvesets shelvesetName /format:detailed you get the shelveset’s name and some metadata associated with it, but not the changes. To get a list of the changes in a changeset, run: tf stat /shelveset:shelvesetName;DOMAIN\ownerUserName The
Posted by mohamedg | 2 Comments
Filed under: , ,

How to: Disable multiple check-out on a folder?

There’s no direct way to do that. Multiple check-out is a property of a team project, it's not namespace specific. However, I can think of 2 alternatives using use the " Lock " feature, because that’s what TFS does when a team projects is set
Posted by mohamedg | 1 Comments
Filed under: , ,

How to: Find distinct changes by user?

You can find changesets if you open Source Control Explorer and hit Ctrl+G or choose Edit > Go to… However, this shows changesets with no details, you have to double click it first. If you want to see detailed info all at once, you can use the command-line:
Posted by mohamedg | 0 Comments
Filed under: , ,

Deny: revisited

In a previous post , I talked about the deny option and how it’s evaluated. The documentation on MSDN is talking about conflicting permissions on the same level, however, in TFS2008 SP1, permissions are evaluated bottom up and the first match wins. If
Posted by mohamedg | 2 Comments
More Posts Next page »
 
Page view tracker