How can I make Side-by-side be the default diff for my GitLab installation or project or profile?
Update February 2016
The issue is now at issue CE 3071 and... was resolved by commit 9fdd605!
A cookie now retain your diff view choice, with GitLab 8.5.0+.
Original answer (February 2015)
That doesn't seem to be possible right now, and can be voted up at the suggestion 7082397
Remember side-by-side diff choice
Right now when I want to review code, I have to choose side-by-side diff each time I open a Merge Request because that choice is not stored/saved anywhere.
Either store my last choice/change of viewer globally somewhere and use it on all diff views from that point on.
Or let me have a config option on my account where I can specify my preferred choice.
The side-by-side diff view was introduced with GitLab 6.4 (Dec. 2013) with commit b51c2c8.
Change the setting once from the gear icon at the top-right of any diff, and it should hold across other diff sessions.
Related
I've been using Meld to compare directories recursively. I want to know how to export the comparison result onto a new file. Meld is a visual tool but is there any way I can save the comparison?
As of version 3.18.0 this is not a supported feature.
You can see the advertised features here.
If you dig into the code, an UI option to save content (and subsequent implementation) is only present in data/ui/filediff.ui and not in data/ui/dirdiff.ui. This means comparison output can only be exported when comparing files.
The code snapshot is from the latest commit on master, January 2 2018: 945014f5.
Update: I also confirmed just now (28 Jan 2021) on Ubuntu 20.04 that the latest version of meld on gitlab, meld version 3.21, does NOT have this feature either. See my comment and screenshot here: https://gitlab.gnome.org/GNOME/meld/-/issues/551#note_1019418.
Please click on the feature request issue below and upvote it to get this feature request some positive attention.
My version of meld is:
$ meld --version
meld 3.18.0
...and this feature still does not exist as of Jan. 2021, so I have opened this issue on the meld project in Gitlab here: meld Feature request on Gitlab: create a way to save or export GUI meld comparison views as both HTML and PDF.
Please go upvote it. If you don't have a Gitlab login to be able to upvote it, you can create one now or log in to Gitlab with your GitHub credentials.
Upvoting it gives it attention and may help get this feature sooner. Developers have the tendency to implement those features first which they know people want, so upvoting it gives it visibility.
If you have the skills and time (or the time, and want to start developing the skills), please join their mailing list and start working directly on implementing the feature yourself.
See also:
https://meldmerge.org/development.html
https://gitlab.gnome.org/GNOME/meld#contributing
Because the title doesn't specify that the question is about directory comparison, I landed here by Google for exporting a "(temporary) file comparison".
Why bother to do that if there is the diff command?
I use meld to compare content by pasting temporary content into the panes.
For anyone else searching a way to export that:
File->Format as Patch...
has even a Copy to Clipboard button.
Tested with version 3.20.4
I do use Netbeans and TortoiseHG to manage and view Mercurial changesets but my problem is that I want to see differences for a range of changeset.
Real case: Gil is working on a feature in his own repo and he adds more changes incrementally.
His changesets are: 47(message: initial tests), 48, 49 (message: fixed bug added in 47), 50 (message: feature ready).
[Changeset 46 was made by me (Alex) so I know the code until 46 inclusive]
If I do review each commit I might spend time on bugs he already fixed down the road (ex: I see a bug in 47 but he fixed it in 49).
I want to avoid reviewing each commit and I want to be able to review whole 47-50 range at once - as a single change set.
Is there any tool, option, tweak to achieve that?
TortoiseHg can launch a visual diff of two revisions or it can output a diff file for them.
The instructions for Windows are as follows:
Click on one revision
Ctrl-click the other revision
Right click on either of them
Visual Diff... will launch your configured visual difference tool and Export Diff... will create a patch file for you to review.
This is probably available for other OSs that TortoiseHg supports but the clicks may be different.
This launches KDiff3 on my system which gives a tree containing all the changed files. Double-clicking on one of the files show the changes in another pane.
I have installed the MercurialEclipse plugin. I am finding it very hard to use.
I have been using the Mercurial support in NetBeans for a while now, there are many things I would like to be able to do in Eclipse if possible:
In NetBeans any changes to source code are highlighted in the line
number area. New code is green, modified code is blue, and removed
code is red.
Files in the project explorer appear as blue or green for modified
and new respectively.
In NetBeans I can right click any directory in the project explorer
and go to Mercurial->diff to get a visual diff for all files (in the
directory I clicked) that have changed since the last commit.
When I right click a directory in Eclipse I am given a compare with but
with only 1 option (each other) that is disabled.
Even worse, when I
right click an actual file I know has changed and go to compare with I am
given 3 options (local history, parent changeset, different
changeset). If I click parent changeset it does not give me a diff. I assume this is beacause its the first time the file has changed since 3 commits ago. Which doesn't make since, I just want to see what I have changed to review it before commiting. I would like this to show me the changes I have made since my last commit i.e. the changes I will be committing.
Please note I am not trying to bash on Eclipse and I am not trying to Praise NetBeans. I am just wanting to know if there is a way to setup a workflow in Eclipse like I am used to in NetBeans.
Some of the things you are requesting are not specific to the VCS you are using, they are part of the Eclipse Team support, so they will work with any VCS system.
1) Showing the code changes: The closest Eclipse has to that is Team -> Show Annotations, but I don't think this will show the added/changed/deleted lines from the current version. I would file an enhancement request to Eclipse about this.
2) Eclipse shows different icons for added and changed files. You should see a blue + for an added file and a brown * for a changed file.
3) To easily get a diff from what's committed, you can do Team -> Synchronize. This brings up the Synchronize View. Another way is you can do a Team -> Commit at any level and then in the listing of the files, double-click the file which will bring up the comparison between the files (that will show one file at a time). Another thing you can do is select Compare -> Another Revision... and select the desired revision in the dialog (this will show all enclosed files in a single compare editor). Finally, the Compare -> Parent Changeset on a specific file does shows the changes from the committed parent for me, even if it was not changed in the most recent revision. It's possible you have encountered a bug in Mercurial Eclipse.
Be sure you are using the latest version of Eclispe and also Mercurial Eclipse. Mercurial Eclipse is pretty active and they are adding and fixing things all the time. I tested this on Eclipse 3.7.1 with Mercurial Ecipse 1.9.1.
This is an older question, but i had the same problem, and found this info useful.
I'm transitioning from netbeans to eclipse. I'm no expert but:
For text highligting you can use the "quick diff"
a. Windows -> preferences -> General -> editors -> quickdiff
b. enabling quick diff with mercurial quickdiff seems to mimic netbeans mostly.
For diff's of a changeset of files. I think you need to use the Team Syncroniztion perspective as is mentioned before. Its actually pretty slick once you get used to it.
I know Xcode can be hooked up to an SCM. But how would I set this up from scratch? How to check out / commit files into that, after setting it up?
A great guide for setting up subversion repository & configuring with XCode - http://iphonedevelopment.blogspot.com/2009/03/version-control-is-your-friend.html
Other useful resources -
1) http://developer.apple.com/tools/subversionxcode.html
2) Which SCM system for Xcode?
3) http://www.covertapps.com/development/6-setting-up-your-xcode-scm-repositories
Thanks,
Sagar
Once it is set up, several new menu items appear in the SCM menu. You can right-click over specific filenames and perform some SCM operations that way.
You can also right-click over "Groups & Files" and enable "SCM" there, which will show which files are new or modified.
I never used Xcode's SCM features for anything more than to see what files I've modified, a feature that only helped me find the code I was currently fixing. For all the updates & commits, I would use the command line, but that's a personal preference. I'm a long-time command-line CVS and SVN user. It is faster for me on the command line.
I highly recommend starting with git - while I once preferred perforce I don't like paying for it and lack of Xcode integration makes it tedious. Git is supported in Xcode 4. Using it without integration for a month or two would be invaluable as you will then understand more of what is going on... SCM, like data backups, is only any good when you understand it and use it right.
I like git because it can be used as a local SCM with replication/sync with a central repository. It is widely used and actively maintained. It is free & open source, and I have used it as part of a team delivering a very complex and successful iPhone app.
I really like Git Tower as a GUI.
I'm trying to migrate to TFS from VSS and I need to be able to show what files were checked in between two releases. In VSS we would just label the code for a release and view history between labels and generate a report to show the checkins and the comments. Is there a way to get similar results with TFS? Or show the differences between two changesets or labels?
The command line tool tf.exe gives you more options than the GUI (and can either give results in a Dialogue or as standard output --- good for feeding into further processing).
E.g.
tf hist . -r /version:C10~C1000
will list all the changesets affecting this folder and content recursively between changesets 10 and 1000.
See the documentation on MSDN.
If you need maximum flexibility, you can create your own commands using the TFS client assemblies. Unfortunately documentation is somewhat sparse.
Right click on your desired folder on TFS (e.g. the root folder), you'll find following two options:
1, Apply Label - this allows you to apply label to a particular version of that folder.
2, Compare - this allows you to compare that folder between versions, and one of the choices is comparing by label.
Right click on any node in TFS Source Control and choose 'View History'
This will show you all changesets ordered by date descending.
Double click on those and you can see the detail about the change set: the comment, associated work items, and files that were changed.
As Jeff said, right-click on the project, any folder or file, and choose "View History" to see all changes. If you know when your labels were applied, it's easy to scroll down this list until you hit a particular date/time.
For an exact list between two labels or changeses, use "tf.exe history" (as Richard says) from a Visual Studio command prompt (in your start menu in the Visual Studio 2005 folder). For more info on this just execute "tf.exe help history".
For day to day changes, if you use TFS build you can see the changes since the last build at the bottom of the build information page (Double click the build name in Team Explorer, then double click the specific build. Scroll to the bottom of this page and open "associated changesets". I've set out CI build to not associate changesets, which means that our daily test build lists all changesets since the previous daily build - a great summary of the changes for our testers to get their teeth into.
I was using the command line tf hist and getting the changesets to compare by finding the highest changeset in a label or branch changeset, but having a manual process and using the command line didn't go over too well here. I used Carl Daniel's code to write a little web application that will bind the changes to a datagrid.
If you're looking for something special the standard interface doesn't give you it's fairly simple to write your own application that links into TFS. I'd definitely suggest it.