25

Which is the best Visual SVN Diff displayer for Linux.

BeyondCompare and VisualSVN 1.5 work well on Windows. What are the equivalent tools for Linux? (Specifically Ubuntu).

I know command line diff works; But I'd like multiple column syntax highlighted and differences.

Better if the tool has a support for Git and Hg as well.

bahrep
  • 29,961
  • 12
  • 103
  • 150
lprsd
  • 84,407
  • 47
  • 135
  • 168
  • 2
    Not specific to versioning, but this page lists a lot of diff tools (be sure to check the comments): http://www.amjith.blogspot.com/2007/07/visual-diff-tools-in-linux.html – Stephan202 Jul 17 '09 at 06:37

11 Answers11

42

I have been using meld for this purpose, in Ubuntu you can just do:

apt-get install meld

I think it only does two-way compare, but usually that is only what you need, and only what the diff shows you anyway.

When you get a conflict using SVN and have to do a merge, you usually get 4 files AFAIR.

  • file.mine - The file with your local changes as before svn update.
  • file.r<n> - The revision on which you created your local changes.
  • file.r<n+m> - The revision you updated to from svn, usually HEAD.
  • file - Subversions attempt at merging your changes into the updated file.

So to use meld to merge your changes in, you would do:

meld file.mine file.<n+m>

And merge either your changes into the revision updated from svn, or the other way around. It is usually easier to merge the file with the fewest changes to the file with most changes.

And last you would override file with the merged file and do a:

svn resolved file
Sergey Telshevsky
  • 12,077
  • 6
  • 55
  • 78
Bjarke Freund-Hansen
  • 28,728
  • 25
  • 92
  • 135
8

Diffuse supports Subversion, Mercurial, Git, and several other version control systems. It works on Windows too. For Ubuntu, just install the .deb package with "$ sudo dpkg -i diffuse-*.deb" and then run "diffuse -m" to view your changes or fix merge conflicts.

7

Beyond Compare supports Linux as well. If you already like BC for Windows, I'd say go with a winner.

Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825
6

Note: If your diff tool has a CLI (a command line interface), it can be integrated with Git quite easily, both for diff and merge (if it supports 3-way merges).
Since Git1.6.3, the difftool - mergetool options allow you to integrate that diff program (see "How do I view 'git diff' output with visual diff program?").

KDiff3 for instance is a good candidate for that, since it is even auto-detected by Git.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
3

KDiff3 is very good (I also use it on windows). It works for both compare and merge.

jeroenh
  • 26,362
  • 10
  • 73
  • 104
1

I've used SlickEdit a lot on Linux. It has a pretty nice integrated diff viewer/editor. It works with SVN, CVS and a couple other version control repositories.

Eric
  • 6,364
  • 1
  • 32
  • 49
1

What about kdiff (especially if you use KDE) Or, if you have an IDE (like Eclipse / netbeans), does it not provide SVN-related functionnalities ?

(I personnaly use Eclipse PDT for PHP ; and it's Subversive plugin for SVN)

Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663
1

I use Vim's diff mode for this. With the vcscommand plugin, you can simply type :VCSDiff to enter diff-mode on the current file versus its history.

ephemient
  • 198,619
  • 38
  • 280
  • 391
1

Well.. did anyone try DiffMerge yet ? If not then I recommend all to do so. If you have used WinMerge for windows, then you will find this as a great alternative to WinMerge for Ubuntu / Linux.

Try out the following web for details: http://www.webtechquery.com/index.php/2010/05/free-diff-tools-ubuntu-linux-windows/

Thanks

0

There is also ECMerge, it has built-in support for HG,Git,Bazaar browsing (as long as their respeticve command line tool is there), together with syntax highlighting and so on: http://www.elliecomputing.com/ it works identically on Linux, MacOS X, Solaris and Windows.

akjoshi
  • 15,374
  • 13
  • 103
  • 121
Armel
  • 21
  • 1
0

From few months I have been using submerge from "subcommander" package. I've described it here.

Lukasz Frankowski
  • 2,955
  • 1
  • 31
  • 32