Compare two projects using vscode - visual-studio-code

Is there any way to compare two identical projects (with some differences) in vscode? I want to find the difference in the files (e.g. main.c in the first project vs main.c in the second project and so on recersively)
Note: The are a lot of files. I don't want to compare them one by one (by right-clicking on them and choose the compare with option)

I am unaware of VS Code doing this. Beyond Compare does this very well. (exactly what you are describing)
You can choose two directories. The UI will show two columns, and in each they will be highlighted red if there are discrepancies. You can open each folder to see what the differences are.

Related

VSTS: finding project-wide changes between two change lists or labels

I have a large project that is hosted in VSTS. I'd like see the differences in all files, project-wide, between two change lists. (It would also be helpful to do the same between two labels, since I have labels at the two points of interest.)
We have a problem that manifests between one build of our product and another; one way to go searching for the issue is to comprehensively review the code that changed between those two builds.
How can I show the differences in all files, project-wide, between one change list and another?
I've tried this:
tf diff . /recursive /version:100~150
and it seems to work, but it takes a very long time; and the output is a plain text diff. Can I browse the changes graphically, like in BeyondCompare or the IDE? Anything I can do to speed up the comparison?

Shrink down empty directories explorer in VSCode? [duplicate]

This question already has an answer here:
Is there a way to flatten or merge single-folder folders in vs code explorer?
(1 answer)
Closed 3 years ago.
I'm looking for some way to reduce the visible size of directories in the explorer, that only have one directory/file in them. I'm not quite sure how to explain this, but basically I want to turn this:
OPEN FOLDER
-ChildFolder
--GrandchildFolder
---GreatgrandchildFolder
---file
---file
Into this:
OPEN FOLDER
-ChildFolder\GrandchildFolder
--GreatgrandchildFolder
--file
--file
GitHub does something like this, for example on https://github.com/Bukkit/Bukkit/tree/master/src (a java project), you see test/java/org/bukkit (hovering shows "this path skips through empty directories").
Is there any way to do this in VSCode? It's pretty minor but would be really nice to have when working across multiple java projects.
This should be available mid-december 2019 with VSCode 1.41.
Compact folders in Explorer
In the File Explorer, we now render single child folders in a compact form.
In such a form, single child folders will be compressed in a combined tree element.
Useful for Java package structures, for example.
Setting explorer.compactFolders controls this behavior.
By default, this setting is turned on.

how to find the number of lines which got changed from one label to another in clear case?

I would like to find the number of lines of code which got added/modified/deleted between two releases. I have a label which is applied at the end of release.
There is ClearCase Report Viewer which shows list of elements which got modified between two labels. But I am looking for number of files which got changed.
Any solution to this?
The easiest way (without involving any commercial third-party tool) is to use linux commands diff and diffstat and apply it to two dynamic views, each one with their own config spec selecting a label:
element * LABELx
element * /main/LATEST
That way, you can get a full report of the differences between the two diffstat reports.
See "Difference between two versions in ClearCase dynamic view" for a concrete example.
diff -u /view/VIEW1/SOMEVOB/some/dir /view/VIEW2/SOMEVOB/some/dir | diffstat
Note: this is valid for Windows as well, since any Git distribution includes diff.exe, and diffstat is available for Windows.

In Eclipse, exclude some files from debugging

Is it possible to exclude files from debugging in Eclipse?
There are my files which I have written and I am interesting in going through these files using debugger Step Over command.
But there are also many imported library files and Step Over goes into these files, which I'd like to avoid. So is there an option eother to specify which files to debug or which files to exclude?
If you're using a JVM based language (as you didn't specify), under Preferences, filter for Step Filtering.
You will see a list of packages. Add your packages to the list, and ensure Use Step Filters is selected.
Assuming it's an entire package you want filtered out, and you're using Java, this should do what you want.

Eclipse text comparison order

I'm using Eclipse 3.4 (on Mac) and I've got an annoyance with the text comparison having the files I'm comparing in a specific order which is not what I want.
When I compare two files it always seems to put the first file (alphabetically) on the left, and the latter one on the right, but I want to be able to change this on a comparison by comparison basis.
IE comparing 'file-a' and 'file-b' will always have 'file-a' on the left, but that isn't always what I want. I seem to recall in earlier versions of Eclipse that changing the file that was right-clicked when choosing Compare With -> Each Other changed the order, but that isn't working for me in 3.4.
An example of why I care:
I've just performed a subversion merge and had a conflict, so I now have the following files:
file
file.merge-left
file.merge-right
file.working
I've made changes to file and now want to compare file to file.merge-right and file.working to file.merge-left and split the editors so I can have the working/left changes sitting above the file/right changes, and then just page through the compare editors and make sure the differences between this file and the file that the merge comes from have been preserved, but file is on the left while file.working is on the right, and hence the differences need to be compared diagonally rather than just comparing top and bottom.
Yes, that's actually very annoying. We use an external tool called Beyond Compare (we have a corporate licence) which can swap the two sides easily.
What you should probably do is raise an enhancement request on the relevant Eclipse team with Bugzilla. If there's enough demand, it'll either make it into the next release or someone will write a new (or modify the existing) plug-in to allow swaps.
There's a "Swap From and To" button when the Compare screen comes up. Using Eclipse 3.6. I'm actually looking for a way to change default behavior. For example, when I compare revisions, it always have the latest revision on the left side instead of right unless I click the swap button before comparing.
As I mentioned here, Eclipse Neon.2 (4.6.2) has a button to swap the views: