Can Meld comparison output be exported to a file? - diff

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

Related

How can I search Github code for a keyword?

I'm a bit flummoxed that I can't find how to do this simple search on Github.
I want to search the code of one of my own repos for a keyword. Surely this is possible?
There is a global search feature but that doesn't seem to do it eg index is about 17 days old and doesn't contain actual code (only results from readme)
Any thoughts? If not maybe there is a 3rd party tool? I'm looking for something that works directly off Github
Cheers
The git grep command has a few advantages over normal searching commands like grep and ack. The first is that it’s really fast, the second is that you can search through any tree in Git, not just the working directory. As we saw in the above example, we looked for terms in an older version of the Git source code, not the version that was currently checked out.
This could be what you're searching for.

Single-file diff between two commits

In github, is it possible to show the diff of a single file between two commits?
One can readily diff two commits, and it is possible to link to the anchor for a specific file in those two commits, but all files are included in that view. For example, https://github.com/adamginsburg/APEX_CMZ_H2CO/compare/a94a962db51e0f4e73ec3ba4170a0ca8269548da...adamginsburg:master#diff-22
I would like a similar view, but without the other files.
(I know how to do this on the command line with git, but I want to share this link with collaborators, so the command line approach is not relevant for this question)
I think your question can be consider a duplicate of this one :
How can I generate a diff for a single file between two branches in github
Unfortunately, the accepted answer doens't answer your expected behavior.
I really tried to exclude the other files without success, and since there not seems to have other means to filter it out but html anchor pointer, I guess what you already have is what best available with Github to pin point the change you want to talk about with your peers.
I can recommend you to use Vscode with the Git History, I know is not the same as having in Github but it allows you to see the changes of the code according to an specific file or the entire project, comparing with the actual code, see all the changes of specific file through the commits, I work with this tool and this is helpful for me, hopefully it will be helpful for you.
Git History Example Usage
You can use the GitHub File Diff extension available for Chrome and Firefox.
Disclaimer: I made this extension.

Eclipse Git "Commit Changes" missing file [duplicate]

I have been using EGit to upload my stuff to github for a few months now.
But off late I do not see what files have been changed, and I dont know why. Please help.
As you can see I have updated some files and I cannot see a list of files in the files section.
This looks like a problem with Mac OS X 10.10 and SWT, see Eclipse bug 446534 for details.
Note that the heading above the table says "Files (1/1)", so EGit calculated the changed files correctly, but it isn't visible. Try if resizing the window makes it appear.
The Git Staging view, which is another way to commit using EGit doesn't seem to have the same problem. Maybe you could consider using that instead of the Commit dialog, see the user guide.
As the comment 2 at the Eclipse bug 446534 mentioned, calling table.pack() will solve this problem for a single tableviewer.

Avoid Mercurial adding Local/Other tags to original file when merging

I am using mercurial via tortoiseHg (windows) as a source control management tool.
I am used to merge using beyond a compare. Today, I have to perform a very complex merge and I just discovered a new feature (my client was updated some days ago) that is extremely annoying.
When I have a conflit and ask Mercurial to take the "other" file and keep the original in a .orig file, the .orig is added with <<<<<<< local and >>>>>>> other, but more than this, the other part is merged into the original one !!!
The two parts are then unaligned and it's impossible to guarantee that the merge is OK because you have to review it line by line with no help from the comparision tool. (see screen below).
http://s13.postimg.org/yor6gno47/Untitled.jpg
I want to disable this feature, but so far, I am unable to do it. Thanks so much for help as this is furthermore blocking my work.
Regards.
The launching of a specific merge tool isn't something Mercurial controls. It does, however, have a robust mechanism for Merge Tool Configuration that allows you to provide a preference order and it will use the first one it can find. The builders of various Mercurial installation packages (ubuntu, etc.) and tools that include Mercurial (TortoiseHG, etc.) all provide their own Merge tool configuration preference list.
Either the old merge tool configuration list you had not longer points to Beyond Compare at the right location (upgraded BC and the directory name changed, etc.) or you got a new merge tool configuration list when you updated some software that included mercurial. Either way that page on MergeToolConfiguration will help you find your preference list in your hgrc files and update or correct it.
Tl;Dr: this isn't a "new" feature it's your new installation being less tailored for your system than your old one. Maybe find who packaged that one and copy the merge tool config.

How to get a previous version in clearcase?

I'm not a ClearCase expert... I would like to get a version of my project as it was, let's say one week ago, or maybe as it was when I finished an old activity.
Is it possible to do so? How should I do? (Please provide detailed steps :) )
For one file, you can use cleartool get, as described in "Clearcase command to export an element".
But for a full view, I would recommend using a time-base config spec rule.
See for instance:
"how to find out all the activities happend in a branch in the last month?".
"ClearCase : Loading Older Version of a specific Directory?"