How to compare all files from two different changesets? - visual-studio-2013

In Source Explorer, there is an option for comparing two different changesets of one single file.
However, I would like to compare all files from two different changesets.
Is there a way to do so?
Or do I need to extract both versions separately into two directories and compare them side-by-side?

You may check this tool Diff All Files for VS2013, which can quickly and easily compare all files in a changeset, shelveset, or with pending changes in TFS to see what has changed.

Related

Visual Studio: (how) can I check in specific lines from a changeset, instead of simply the entire file?

When using Git and the Git GUI, I'm used to highlighting one or more lines, right-click and use the selection as what I want to check-in. This way, I can for example create two check-ins from the same file: say fixed typos (not interesting) and new functionality (interesting for someone that checks the version history).
In Visual Studio, I can only check in the entire file, but not specific lines. In order to do this, I could:
copy the server-version and my local version to Notepad++ as two files,
compare the two files,
copy the selected changes to my reverted local version that I want
to check in,
then check in the current changes,
and finally copy all the remaining changes to my local version so that all
changes are back in my local version. (rinse and repeat for all separate changesets)
This is... not ideal.
Is there a way (perhaps via a client-side plugin) that I can select a part of a file to check-in, but leave the remainder un-checked in?
You basically want to do a version control in other words. There are lott of them like git,SVN they are designed to do what you want.

How can you open two different historic versions of same solution in two separate instances of Visual Studio?

How can you open two different historic versions of same solution in two separate instances of Visual Studio? (VS2012)
What I need to do is look at the whole solution for a point in time so I can use "find all references", which you cant do when viewing a single file from a changeset.
If you get the whole codebase for the changeset you require then you overwrite the current code base (as both code bases sit on same location on your local file system) and lose ability to cross reference you current code with the historic version.
Is there a way I can view both current and historic versions of code in Visual Studio (same or different instances) and still be able to use find all references in both versions of the code?
You will need to
Pull the first version using the "Get Specific Version" right click option within Source Control Explorer
Copy the files from your local path to a different path
Pull the second version
Open two instances of VS each pointed to the appropriate folders
Its not pretty but it works.

File and folder compare tool for Mac (like Synchronize It!)

I need a file compare and merge utility like Synchronize It! only for Mac. THE MOST IMPORTANT feature to me that I cannot seem to find is the ability to save off files that are different and keep the folder structure. As an example, I have a production version of a web app and a self-hosted version of the same app. When I make changes in the production version, I want to provide patches for the self-hosted version - but only the files that have changed. There could be 1/2 dozen files in 5 different directories. So, I need to be able to easily save these files somewhere instead of just merging them. And I don't want to have to print out a diff report, copy the files manually, create the file structure, etc. etc. Thanks!
patch is the inverse of diff. rsync is pretty awesome at keeping files synchronized.

Where to physically store a VisualSvn branch or trunk to compile

I'm using Visual SVN with Visual Studio 2010 and want to work on a feature branch of my solution. I've read the documentation here and the book regarding branching. I'm new to Visual SVN and seem to be missing the idea of where I should keep my copies of the files I am using to actually develop and compile the different version of my project. I understand that to SVN, the repository basically holds "virtual" copies of the files. Will I need separate local copies so that one folder will contain only those files from the trunk copy and some separate folder will contain the full solution of the branch?
As I understand it, Visual Svn will let me make my local copies wherever I want, but I'm trying to figure out a logical way to do this. If I have two separate folders with these near-identical versions of my app, won't I have two indistinguishable entries in Visual Studio's start menu? They would list different paths if I mouse over it I suppose. Am I missing the point, or do I just feel awkward about the way to do this?
Yes, I think it is only subjective. It was the same for me the first times with SVN, but...
Checkout in different folders for trunk and branches (naming each folder in a meaningful way)
then create two different desktop shortcut to your different solutions in your different folders and go back to code...

Git Merging of Binary Files (in particular Xcode project files)

I've got an Xcode project under git and I've got a "experimental" branch off of my "master" branch. Both branches have diverged since the branch (so no fast-forwarding!), and I am merging "experimental" into my "master" branch.
I've setup a .gitattributes file to treat a particular Xcode file (project.pbxproj) as binary, as it should be treated as such. However, I'm not sure exactly how to merge it. I'm not sure what that particular file does, but if for example it handled which files were added to the project there's no way I can merge them, and therefore I'd have to manually add certain files back to the project (possibly not remembering them all). How do others handle this situation?
Also, I've read that you have to manually update binary files (obviously) or copy over different versions. However, once I'm into the merge process the file in my working copy is the "master" version. How can I access the "experimental" version? I can't check it out as it would disrupt the merging process.
Thanks for your time!
In general, for binary files, I recommend a copy-merge type of .gitattribute directive.
That is, I just copy the file coming from the remote end of a merge.
For .pbxproj files however, that may not be a good option, as described here.
Wrapping these files would only make the problem worse as far as I can tell - as you wold be completely unable to merge changes.
While you can merge project files in some cases, it's not something that you should
count on being able to do. The basic recommendation is to avoid editing the project files at the same time as someone else.
I like versionning projects files (like the ones for Eclipse), only if I know they are:
not modified that often (certainly not by each developers)
only using relative paths
no data specifics to one workstation
In short, if those files are not to be merged (or will only be trivial to merge), I want them in a VCS. In your case, that may not be so useful to have them in said VCS in the first place.
Note: as mentioned in the Git manual:
During the merge, the index holds three versions of each file. Each of these three "file stages" represents a different version of the file:
$ git show :1:file.txt # the file in a common ancestor of both branches
$ git show :2:file.txt # the version from HEAD.
$ git show :3:file.txt # the version from MERGE_HEAD

Resources