How to change TFS project version and how to use old versions.
I explain my question with an example.
I have a number of projects in solution name is TestSolution.(Suppose solution version is 1.0)
I create publishing file of the solution suppose 10-Dec-2013 and publish to Client (we are changing version 1.0 to 1.1).
After that we are modifying the project, On 15-Dec-2013 the client asking for a small change that change will fit in Version 1.0 then we need to create a new publishing file on Version 1.0. Is it possible on TFS 2010? And merge the change form on Version 1.1?
Yes, you can branch a directory in source by date or changeset.
To branch by date or changeset:
1.In Source Control Explorer, right-click the folder or file that you want to branch, point to Branching and Merging, and then click Branch.
The Branch dialog box appears.
2.In the Target box, modify the location and name for the new branch.
You can also click Browse to specify a target.
3.In the Branch from version section, click one of the following options in the By list:
If you click Changeset, you can specify the number of the changeset in the Changeset box. As an alternative, you can click the ellipses (…) to open the Find Changesets dialog box.
-If you click Date, you can specify a date in the Date box.
I would suggest you look at using labels on your source when you release. It gives you the ability to have an exact marker of your source to branch from in the future if needed.
Related
I have 2 branches (A and B) and the situation looks as follows:
On branch B, for one file I clicked Get specific version and picked the first version of this file. I then switched to branch A to merge version from branch A to B but it tells me that there are no changes to be merged. When I click compare on both files there are many changes
After doing the "Get Specific version" you need to check out every file in the changeset manually (right-click, check-out). Be sure that you have the "Get latest on checkout" turned off.
After that perform a get latest, which will prompt you to merge. This is going to be a more tricky merge, since Visual Studio will assume that the newer version is what you want. When you're satisfied (you can keep local version), check in the code. Then merge branches.
You can also try "Get This Version" on the changeset. This is MUCH quicker than "Get Specific version" because you don't have to download the whole repo again.
Follow below steps to do that:
1) Go to Tools-->Options, select Source Control-->Visual Studio Team Foundation Server. Un-check 2 options shown below.
2) For the file you'd like to edit, select the file, right click and View History. In the history screen, select the version you would like to edit. Right click and select Get This Version.
3) In Solution Explorer, double click the file and it should open the version you selected in the History view.
4) Make your edits and Check-In. You will get a Resolve Conflicts screen. From there either Merge Changes In Merge Tool or select Keep Local Version to check in the file as is.
5) Merge branches.
Using VS2013 and/or VisualStudio.com, is it possible after creating a branch ("Main" branched to "Dev001") to view a list of all the files that differ between "Main" and "Dev001"?
For example, I'd like to see all the files that have been amended/created within the current branch, since it was branched.
The closest I have got is right-clicking the branch, selecting View History, then clicking each changeset to view the files in the Changeset Details panel, however, there are many changesets in there which is taking a long time.
Please note I am not using Git.
Just right click on your Main branch in Source Control Explorer an select Compare.... From there you can specify the path to your branch and the versions you would like to compare.
In the source control explorer it says per file if we have the latest or not, and if you right click and view properties it says the latest version and the workspace version. Is there any way to see the overall latest version and the current workspace version (and possibly to add columns for the two on a per file basis rather than having to check each file's properties one by one)?
We are using both VS2012 and VS2013.
Not from the GUI but you can use the tf properties command to get that with /recursive option
http://msdn.microsoft.com/en-us/library/tzy14b58.aspx
I have a file that was checked in and is part of a C# project. However, this file is incorrect and it overwrote the previous change which was correct. I need the latest change of this file to revert back to the previous changeset, and I need the previous changeset to be the latest change.
How do I do that?
You can roll back to the previous changeset. This option is only available from the commandline.
tf rollback /toversion:VersionSpec ItemSpec [/recursive] [/lock:none|checkin|checkout] [/version:versionspec] [/keepmergehistory] [/login:username,[password]] [/noprompt]
Alternatively, use Get Specific Version (check all the boxes to override the files) to get the version of the file you want, check the file out and check it back in again. When prompted to resolve merge conflicts, select use local version. This will create a new version on top of the incorrectly checked-in one.
If you install the TFS Power Tool, you can roll back the changeset. With the Power Tool installed, you can do this in the GUI. Select the changeset in a history list, and right click and select Rollback entire changeset.
Here's a nice article:
http://www.edsquared.com/2010/02/02/Rollback+Or+Undo+A+Changeset+In+TFS+2010+Version+Control.aspx
From this article:
You find the TFS Power Tool here: http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f
In TFS when you merge branch A to branch B and checkin, you get a single changeset on B (typically with a comment like "merged A->B").
This means B doesn't have any of the checkin history from A. So if someone created a new file on branch A, you can't tell who created it from branch B. And if someone updated a file on A, you can't tell who did the update from branch B.
Is there any way to see this kind of detailed changeset history across branches? Some kind of power toy, or third party tool, or anything?
Update: The TFS Power Toy tfpt history /followbranches tool does not "expand merges," it only "expands branches" and therefore doesn't solve this problem.
Right now 'tf merges' and 'tf merges /f:detailed' provide the most complete merge tracking information. However, they are command-line only. And the only 3rd party tool I know of that attempts to provide a GUI is TFS Sidekicks.
This gets a lot easier in TFS 2010. See screenshots at:
http://blogs.msdn.com/mitrik/archive/2009/06/08/first-class-branches.aspx
http://msdn.microsoft.com/en-us/library/dd405662(VS.100).aspx
http://msdn.microsoft.com/en-us/library/dd465202(VS.100).aspx
http://blogs.msdn.com/bharry/archive/2008/01/16/new-features-to-understand-branching-merging.aspx (old prototype, has changed somewhat since then)
TFS 2010 will include support for this.
Brian Harry talks about it in this presentation.
You will now be able to see where a change originated and who made it after the change has been merged to a different branch.
TFS SideKicks is another good tool for supplementing TFS default tools.
The TFS 2008 power toys does come with the tf history /followbranches command. But that command doesn't expand merges.
All it does is show you the change set history from A before branch B was created. What it doesn't show you is what change sets were merged from A -> B after the branch was created.
In other words, what I want to see is all the change sets that were made on a source branch and then applied to a target branch as part of merge operation.
I think you would find TFS Sidekicks helpful, especially the history area:
History Sidekick application pane provides the following features:
View version control tree with files and folders (similar to Source Control Explorer)
Search item (file or folder) by name and select found item in version control tree
View selected item history either for all users or filtered by user
Export history list to CSV file
Compare file versions selected in history
View selected item properties and pending changes
View selected item branches tree and selected branch properties
View selected item merge history; it is possible to view separately all merges performed with selected item as a merge target (merges to) or with selected item as a source (merges from)
Compare merge target and source file versions in history
View selected item merge candidates in a tree view; it is possible to select single merge source from the list
Compare merge candidate file version with latest version of target file
View selected item labels either for all users or filtered by user; the information displayed includes item version in label
Compare file versions between two labels
View changeset details supported in all lists containing changesets
Team Foundation Sidekicks
Might want to try the TFS Follow branch History tool:
http://www.codeplex.com/TFSBranchHistory
"TFS Branched History" plugin exists at Microsoft Gallery:
http://visualstudiogallery.msdn.microsoft.com/7d4f37b6-f9a4-44c6-b0a0-994956538a44
Plugin does insert "Branched History" button into the context menu of Source Control Explorer (TFS)
The button icon is with clock like standard "History" but with blue arrow:
If you click "Branched History", new window will be opened and Path property will be set to the current Source Control Explorer path:
Click "Run query" to get results at the "History" tab:
From context menu you can query standard Changeset Details and Compare File (Folder) dialogs.