merge tools

Björn Lindberg d95-bli at nada.kth.se
Mon Nov 1 04:55:00 PST 2004


Miguel Bazdresch <lfs-01 at thewizardstower.org> writes:

> * Björn Lindberg <d95-bli at nada.kth.se> [2004-11-01 11:57]:
> > Miguel Bazdresch <lfs-01 at thewizardstower.org> writes:
> > > 
> > > What are you guys using to merge code?
> > 
> > I use plain diff & patch. :-) But seriously, what do you want it for?
> > I have never used any of the tools you mention, but I know that Emacs
> > has a diff mode, although I haven't really used it much either.
> 
> I have a document in Latex, and a copy of the same document with my
> advisor's comments and corrections. What I want to do is to see both
> files side by side, and to be able to choose which changes from the
> modified file I want to merge into my document. I don't want to blindly
> merge all changes.
> 
> I could do it with any editor and just see both documents side by side
> and make changes by hand, but there has to be a better way :) Actually
> meld does almost exactly what I want (which is to automatically transfer
> changes from one document to another) but as I said, it's too slow.

Ah, I see. If you are an Emacs user, Emerge seems to be exactly what
you are looking for:

  http://www.gnu.org/software/emacs/manual/html_node/Emerge.html#Emerge

  "It's not unusual for programmers to get their signals crossed and
   modify the same program in two different directions. To recover
   from this confusion, you need to merge the two versions. Emerge
   makes this easier."

  "The Emerge commands compare two files or buffers, and display the
  comparison in three buffers: one for each input text (the A buffer
  and the B buffer), and one (the merge buffer) where merging takes
  place. The merge buffer shows the full merged text, not just the
  differences. Wherever the two input texts differ, you can choose
  which one of them to include in the merge buffer."

Emacs also has Ediff, which could be of help:

  "When Ediff starts up, it displays a small control window, which
   accepts the Ediff commands and two or three windows displaying the
   files to be compared or merged."


Björn



More information about the lfs-chat mailing list