How to actually USE WinMerge from Github Desktop (Windows) - github-desktop

Is there a way to use WinMerge with Github Desktop (the GUI)?
I've seen how to add winmerge to the .gitconfig tool and have done that. But then the only directions that I've actually seen for using it from the desktop GUI is to use the GUI to open a command prompt and then use it from there. Is that it? I'd have to learn the git commands, type in the filename, the versions to compare, etc? That's not really a GUI...
In SourceTree I was able to do the following:
Click to select the two versions that I want to compare (committed versions or latest uncommited). This gives me the list of changed files. Then I'd select a file. A little view of changes would appear. I'd then use a dropdown to select to view the diff. WinMerge would open, comparing that file between those versions.
What's the equivalent in GitHub Desktop?

Related

TFS tool to show file changes when getting latest?

I know I can look at the "Source Control - Team Foundation" output in the Output window but it's hard to tell where the results from the current request begin and the last request ended sometimes, and any files that I want to compare that are in the list I have to go look up.
In the past when I used subversion, I had a tool (I think tortoise) that did an awesome job showing me all the files that were changed and I could click directly on them to compare with latest version. I would often use this to do quick code reviews, and it made it much easier to make sure I wasn't about to get an updated project file that had been improperly merged.
Are there any extensions/plugins or anything that can help with this for TFS when getting latest?
Unfortunately there isn't such a tool can exactly achieve that, there is a user voice submitted here, and it's ARCHIVED.
Based on my experience, the best thing to do is a folder comparison before you get the latest version. In Source Control Explorer, you can compare the differences between two server folders, two local folders, or a server folder and a local folder. Right click on the target folder and select Compare. Read more here.
To see the changes block you can introduce the third compare tools. (e.g BeyondCompare, ExamDiff, Code Compare etc, you can reference my answer in another thread : Visual Studio TFVC Merge Lines Misaligned). In short you can get the change list from Output window, then compare each file accordingly.
Besides, you can also try using the Tf Command Line Utility and the Visual Studio extension Diff All Files for VS2013. Reference this thread for details : TFS Shortcut to do a diff on all modified files with latest version

TFS get specific version of solution

Is there any trick to just get a specific version of just a solution? I have a large number of solutions and support libraries in the source code tree. I would prefer not to have to bring all of them down when I build a sandbox of a specific labelled version. In VS2015, I can open a specific solution, but is there a way to specify the label when I do this?
It is not possible to choose the version of the solution when opening it.
You can however choose to get a specific version of the solution and its projects when getting the source code locally. You can do this by right clicking the solution folder in the Source Control Explorer and selecting Get Specific Version. Here you can select a specific version either by specifying a changeset, label or date.
I think I have a solution with the suggestion from Tore. You can use the File/Source Control/Advanced/Open From Server... to load the latest version of a solution into your sandbox. Once you have the latest, you can use Tore's suggestion of Right Clicking on the solution then Source Control/Get Specific Version... to pull down the labelled version you want to work on. This appears to limit the file structure of the sandbox to just the files you need to build the solution.
Seems to work with the limited number of labelled version I have. Will update this post if I have trouble with more history in the vault.

How to view/compare a file's history in Delphi?

The title says it all. I made some changes & closed/re-opened Delphi, so I Can't use Ctrl-Z to undo my changes.
How do I compare the current file with previous versions?
For code only, if you don't have a version control system installed, you can view recent changes by using the History tab at the bottom of the code editor window, and then click the Differences tab. How far back you can go depends on how you've configured it; the default is 10 revisions. You can change the default in Tools->Options->Editor Options->File backup limit.
In the absence of any other revision control system there is a History tab in the code editor window - from there you can view a side-by-side diff with previous saved versions by using the Differences tab.
If you installed BeyondCompare with XE8 then you can also access a revision history of your files by selecting (with the file of interest open in the IDE)
Edit -> Compare -> History Compare...
This will present you with a list of saved revisions. Select one and click the Show Diff... button to present a side-by-side comparison.
Going forward, I would seriously consider using dedicated revision control. Commit often and this type of situation should never be a problem for you.
if you have a version control system then use this.
else: if you use Win7 then right-click the file, choose properties and see "older versions". You have to have enabled this Win feature beforehand...
else: your previous versions are lost

Using subversion across visual studio and Xcode [duplicate]

It seems that all of the initial Google results for "using subversion with xcode" are actually just tutorials for installing and configuring svn and Xcode, as opposed to actually using the two (i.e. interacting with svn via Xcode's GUI).
Is anyone aware of a good guide that teaches the tricks and pitfalls of working with svn via Xcode's GUI? Something that bridges the gap between the most excellent Version Control with Subversion book and the Xcode IDE (as in pure Xcode GUI without any terminal command use)?
Edit:
We all love our terminal commands, and we all love Eclipse but (and I mean this in the nicest possible way) neither is really the point of the question. I’d prefer to use svn via Xcode’s IDE instead of via terminal just as I prefer (well, for this case) to code in Xcode’s IDE instead of using vim and gcc. Apple engineers spent a good bit of time implementing that SCM menu in Xcode; someone has to have seen a usage guide somewhere.
I used this page as a reference for setting up my XCode projects with SVN. It is a good starting point, but I'll give a short walkthrough of what I did (since the page isn't really all that helpful!).
A couple notes: I'm using XCode 3.1.2 and Subversion 1.4.2. I've heard of problems with using SVN 1.5, but there are ways around that which I wont get into.
First off, I had a repository already set up and created the XCode project afterwards.
In XCode you need to set it up to know about your repository using the SCM tab in the preferences window. Enter:
A Name (this is arbitrary and used for reference with XCode)
The scheme (http or svn)
The host (i.e. svn.example.com)
The path (the exact path to the SVN repository located on the host)
The port (only if it isn't the default)
And a username and password used to access the repository.
The URL will be auto-filled as you enter the other fields. Hit "OK" when all the fields are good and XCode says it can connect.
Then open your project and do a "Get Info" (Round blue icon with an exclamation mark) on the project itself. Under the "General" tab down at the bottom is an option for SCM, select the repository you made in 1 and close the window.
Now open SCM in the menu-bar and go to "Repositories." Hopefully you've built your repository right using branches, trunk, and other directories at the base level because XCode doesn't have support for checking out the root directory. So go one directory at a time down the list and click the "Checkout" button and select a directory to check it out to (I recommend a "Code" or "Source" or "SVN" directory inside your XCode project directory). You cannot checkout multiple directories at once, but you can tell the next directory to checkout before the first has finished and XCode with queue the commands.
Once that is all done go back to your XCode project window and "Add -> Existing Files..." to your project. Select the directory you've checked out the repository to and I recommend using the "Create folder references" option instead of the "Recursively create groups" option because added and removed items will be automatically reflected in a Folder Reference but not in a Group.
Now you've imported your SVN repository into an XCode project. From here any time you make a change, simply Right-Click (Control-Click if you only have 1 button) in the file and at the bottom of the context menu are the SCM options for comparing, committing, updating, and discarding (reverting) the file. You can also use the SCM menu in the menubar for file or project-wide updates/commits/reverts.
I second the comment by the_mandrill, SVN support from within XCode is very limited, especially if you're used to Eclipse.
I also don't understand why everyone seems to need visual clients. I keep a terminal window open on my project directory and I have no problems interacting with SVN from the command line.
I know this is not quite what you asked, but I wouldn't rely much on the use of SVN from Xcode as what you can do with it is very limited. It's useful for being able to do a diff or annotate direct from the IDE but not a great deal else. I don't think it's any substitute for using a separate standalone client such as SmartSVN or Versions.
You also have to jump through a number of hoops to get Xcode to work with SVN version 1.5 onwards, so that's something to be aware of before installing a standalone client. If in doubt, check out a sandbox first.
Here is one of the best tutorials to configure subversion in XCode - http://iphonedevelopment.blogspot.com/2009/03/version-control-is-your-friend.html
It also teaches even to create repository in local MAC.
if you want to work with svn through a gui interface then i suggest you use eclipse + subclipse plugin (which have more features and much more reliable and easy than svn on xcode)..
you will work in xcode as normal but you will use eclipse only as an svn client (by creating a general project in eclipse and make it points to your xcode project directory )
and here is a tutorial of how to install subclipse
A lot of people have problems using the build in svn client, especially to get a new project into svn and that it works.
I created a straight foreward tutorial on how to do this, along with a very well known pitfall (works for Xcode up till the latest version of xcode incl. Iphone 4 sdk)
http://www.sodeso.nl/?p=599
I myself looked up for some good resources and one of the best I've found is a quite recent video from the WWDC 2012 :
Sign in here if it's not already the case : https://developer.apple.com/videos/wwdc/2012/
Then there is a video called :Session 411 - Source Control Management in Xcode
It explains how to use version control both with GIT and Subversion. It's really nice !
Hope it helps!
As has been mentioned in many other answers, the svn client with Xcode is quite weak (and that is being kind).
Personally, I think that running Eclipse just to get access to a svn client is a bit heavy handed.
I would suggest two answers:
Use a dedicated svn client for the Mac (Versions and Cornerstone are both very good, albeit not free... there are free ones, such as svnX)
If you are not wildly comfortable with the terminal, you can script a couple of the key commands that you want to use and add them to your Xcode user scripts folder, then you can trigger them from a menu item of from a keystroke, just as if you were using the Xcode native client. There's a ton of examples on how to do this available via Google.
I came across these - no idea how well they work, but wanted to add some resources if I could:
http://www.macresearch.org/tutorial-introducing-xcode-30-organizer
http://developer.apple.com/tools/subversionxcode.html
With XCode4 you can perform almost all of your SCM tasks from within the IDE itself, this is a great step forward.
Here is a link to the official guide :
http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/SCM/SCM.html#//apple_ref/doc/uid/TP40010215-CH7-SW26
Unfortunately you still have to use the Terminal command line to add a new project to SCM, this is also clearly documented in the link above.
What it does not tell you is that you also need to manually add ignore instructions to your SCM configuration otherwise you are going to end up with user settings and build outputs in your repositories. I am currently figuring out the list and I will update this answer once I have it finalised.
PS :
I know this question is quite old now but I have added this for those of you who arrive here looking for answers like I did.
PPS :
Terminal command line increases probability of human error, takes longer, is more complex and is less transparent to end users. Overall the omission of being able to add projects to SCM from within XCode is poor design, I expected better from Apple who are usually good at simplifying UI. For the command line fans out there you might feel L337 but try managing a team of programmers and being responsible for their code, command line is not your friend.

Are there any editors that allow you to see revisions of files you have worked on?

I'm looking for an editor that lets me see all the changes I've made to a file on a line-by-line basis.
Eclipse does this. It maintains a "local history" of every revision based on file-saves. Has saved my a** more than a few times.
Eclipse has a local history that gets updated every time you save a file. You can open a change log for the file and compare it to previous versions. It can also recover deleted files.
Apple's Xcode 3.x has a Project Snapshot feature that snapshots all files, so that you can compare and go back later.
As for using a "real" version control system, of course, you should do that, too.
If you work in a group it is basically a must.
But that does not make local history tools provided by the editor obsolete. I see those more as a natural extension of Undo. Just like I cannot use Windows Notepad anymore because it has only one level of Undo, I am beginning to expect that editors let me undo changes that I made last week.
It is Eclipse. It also support multiple language by adding plugin. You can compare each change by comparing with local history. Only you have to take precaution, this tool won't help to revise the changes if you change the file other than eclipse editor.
You'll need some sort of version control software to keep track of all your changes, and a diff/merge tool. Most of the popular version control systems (Subversion, TFS, Source Safe, etc.) come with a builtin visual diff tool.
For example with Java, you can use Eclipse with a Subversion plugin called Subclipse.
There are also standalone diff/merge tools available. Here's a good one for Windows:Winmerge
If you like Vim, there is a builtin difftool called vimdiff. (This would be an example of an editor with diff capabilities).
I'm sure Emacs also has diff tools available, but I wouldn't know.
By using a revision control program like Subversion/CVS/Git you can use any editor and run for example "svn diff".
This is not exactly what you need but you may find it interesting.
There are no editors out there that saves revisions you made. Editors must connect to SVN in order to check their revision histories like in Zend Studio for Eclipse.

Resources