version control - How to Compare source code accross TFS projects -


We have several legacy projects that were recently added to TFS version control. Now we have the issue that each of our projects contains copies of common codes which have been modified from each other and kept separate.

Is there a way in TFS to compare the source with the source in the second solution on the same TFS server with a solution? - I can specify how to compare folders and files.

Organizing a major reconstruction of repository reconstruction or solution due to the size and nature of the solution is not an option at this time.

I am also interested in any API that probably automates this process.

Thanks

"itemprop =" text ">

c: \ temporary> tf folderdiff /

< Former> TF - Team Foundation Edition Control Tool Copyright (C) Microsoft Corporation All Rights Reserved. Displays visual representation of differences between files in a server folder and two server folders in a local folder, or two local folders. Tf folderdiff [sourcepath] TargetPath [/ recursive] [/ noprompt] [/ server: servername: port] [/ filter: filter] [/ filterLocalPathsOnly] [/ view:, same separate, sourceOnly, targetOnly] < / Ex>

C: \ Temp> tf folderdiff 1 2 noprompt

  ======================= = ================================================= = = Items present in C: \ temp \ 1 ====================================== ===================================== C: \ Tampa \ 1 \ falcon ===== ================================================== =================== Item exists only in C: \ temp \ 2 =================== ================================================== ====== C: \ Temporary \ 2 \ bar ==================================== =========== ============================ Show items with different contents ===== ============ ================================================= ======= C: \ Temporary \ 1 \ quux - C: \ Temporary \ 2 \ quux ========================= ================================================= Summary: 1 folder, 4 files, 1 source, 1 target, 1 fraction, with errors 0 ============================= ===============================================  

EDIT: If this was not clear, then the default view source is + ONLY only + different. I had a file named "foo" with the same content in both folders.

I realize that a command line tool is not an API copy, but unfortunately this is the best option. Otherwise you need to crawl the tree yourself - there is no folder difference in the version control API . You all get 15+ confusing methods that work on different items.

On the plus side, if you want to compare all the files that are to be checked, it means that you can calculate without any expensive disk I / O (TFS file every Instant Powershell example:

  Compare function - TfsDir ([string] $ dir1, [string] $ dir2, [switch] $ includeEqual) {$ Dir1 = $ dir1.ToLower () $ dir2 = $ Dir2 ToLower () Filter Decorate ($ dir) {$ _ | Add-member Noteprofile ReliefPath $ _ Server itam TOOLAV () Change ($ dir, "") -passthru | Add-member Notificent HashString ($ _HashValue |% {"{0: X2}" -f $ _} | JoinString) -pastrine $ items1 = $ tfs.vcs.GetItems ($ dir1, $ tfs.VCS_RecursionType :: Complete ) $ Dir1 $ items2 = $ tfs.vcs.GetItems Decorate ($ dir2, $ tfs.VCS_RecursionType :: Full). Compare $ Dir2 $ dirComp to decorate it - Include -qual-property relativity path $ item 1 $ item 2 "- tree comparison ---" $ dirComp | ? {$ _. Side indicator-one "=="} | Feet-Otto Relative Path, Side Indicator $ both = $ dirComp | ? {$ _. Side indicator -eik "=="} | % {$ _. RelativePath} | Linq-ToSet Filter Inboth {if ($ both.Contains ($ _RelativePath)) {$ _}} $ contentComp = Compare -inc: $ includes Excel-property haseststring, relativepath `($ items1 | inboth) ($ Items2 | inbox) "--- content comparison ---" $ contentComp | ? {$ _. Side indicator-a "& lt; ="} | RelativePath, SideIndicator} Unfortunately, doing something like this will take as many lines of 5x code if you need to support the server's def local vs. 

Auto Foot

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -