-- nealbirch <[EMAIL PROTECTED]> spake thusly:

> oh wow.... wish I had known about this a couple of weeks ago when I
> had to merge dozens of updates... is there a way to pull the files
> into emacs to use emacs diff function?

Yes, but it can be .. complicated. I'm using the following:

merge_command="[ -n \"\$SUDO_UID\" ]
    && export  GNU_PORT=\"\$((\$SUDO_UID+21490))\";
        gnuclient -batch -eval
        '(ediff-merge-files \"%current\" \"%new\" nil \"%merged\")'; 
        while [ \! -e %merged ]; do sleep 1; done"

Note that you'll want to change some of %current/new/merged; I've got a
custom version of etc-update running which uses slightly different
terminology than the standard etc-update.

This command uses gnuclient opening a session to emacs running as the
current user, assuming etc-update is running under sudo. Feel free to
tweak as you see fit. I find it's much faster to open a gnuclient
session than to spawn a new emacs each time.

However, all of this also requires a patch to portage.py, which I'll
attach. The gist of it is that it allows escaped quotes embedded within
quoted strings, which I found was pretty much required to deal with all
the shell/emacs/lisp escaping. It also reports line numbers when
reporting config file errors, which is just a nice bonus.

Or you may be able to get something simpler working for you. I tend to
be a stickler for doing things the "right way".


--
[EMAIL PROTECTED] mailing list

Reply via email to