View previous topic :: View next topic |
Author |
Message |
puddpunk l33t
Joined: 20 Jul 2002 Posts: 681 Location: New Zealand
|
Posted: Tue Feb 11, 2003 4:19 am Post subject: |
|
|
I have to say, I don't really understand the concept of DIFF_COMMAND and MERGE_COMMAND. I can put kompare in the DIFF_COMMAND ok, but then what? What do I have to do to make it write the changes, write some of the changes or discard the whole file?
Can somebody please explain? |
|
Back to top |
|
|
zojas Veteran
Joined: 22 Apr 2002 Posts: 1138 Location: Phoenix, AZ
|
Posted: Tue Feb 11, 2003 4:28 am Post subject: |
|
|
the original idea was that the diff_command would just run diff and show you the changes. then the merge_command would be some sort of interactive program to merge the changes together.
I just use gvim -d as the diff command then I can see the diff and perform the merge at the same time in my favorite text editing environment. then I never invoke the merge command from the etc-update command. I just write whatever tweaks I want to one of the files and then use options 1 and 2 from the etc-update menu. |
|
Back to top |
|
|
puddpunk l33t
Joined: 20 Jul 2002 Posts: 681 Location: New Zealand
|
Posted: Tue Feb 11, 2003 4:37 am Post subject: |
|
|
Ah! Brilliant!
Thanks alot zojas |
|
Back to top |
|
|
metal n00b
Joined: 01 Oct 2002 Posts: 36 Location: Spain
|
Posted: Tue Feb 11, 2003 8:10 pm Post subject: |
|
|
KDE users might want to use kdiff3, which have a -m (merge) and a -o (output file) command line option, but I haven't tried it yet. |
|
Back to top |
|
|
idiotprogrammer Apprentice
Joined: 29 Jul 2002 Posts: 179 Location: Texas
|
Posted: Fri Feb 21, 2003 5:39 am Post subject: problems with gtkdiff |
|
|
Well, the idea of using a diff gui sounds awfully appealing.
But ...
even after trying the etc-update changes to tell it to use gtkdiff, it causes a seg fault. (I am just using X, not a fancy window manager though).
Also, I noticed that gtkdiff doesn't allow you to see files starting with a period, which by the way, is how almost all of the config files are.
So unless there's a command line that allows gtkdiff to make . files visible, then the gui is mostly useless.
rj |
|
Back to top |
|
|
Bemke n00b
Joined: 18 Feb 2003 Posts: 2
|
Posted: Sat Mar 01, 2003 12:45 am Post subject: |
|
|
I dont like etc-updates UI, it takes to much time... I use a simple script instead
$ cat etc-diff
if [ "$1" == "" ]
then
echo etc-diff file1 [file2]
exit
fi
f1=$1
f2=$2
if [ "$2" == "" ]
then
f1=$1
f2=`echo $f1 | awk '{print gensub("._cfg0000_", "", "g", $1)}'`
fi
diff -b -B "$f1" "$f2" |grep '[<>]'|grep -v '< #'|grep -v '> #'
echo "Overwrite $f2 with $f1?";read i
if [ "$i" = "y" ]
then
mv "$f1" "$f2"
echo $f2 is overwritten with $f1
else
echo "Delete $f1?";read i
if [ "$i" = "y" ]
then
rm -f "$f1"
echo "$f1 deleted!"
fi
fi |
|
Back to top |
|
|
fbreuer n00b
Joined: 04 Oct 2002 Posts: 47 Location: Berlin, Germany
|
Posted: Mon Jun 23, 2003 5:14 pm Post subject: |
|
|
Another nice program for graphical diff'ing (for use with Gnome 2 for example) is meld. See http://meld.sourceforge.net and try |
|
Back to top |
|
|
Belgabor n00b
Joined: 03 Jul 2003 Posts: 63 Location: Germany
|
Posted: Sat Aug 09, 2003 7:49 pm Post subject: |
|
|
meld looks sweet but unfortunately its useless for merges or diffs that include a lot of whitespace change (it lacks the option to ignore whitespace).
I currently use xxdiff for etc-update using the following lines:
diff_command="xxdiff --style keramik %file1 %file2"
merge_command="xxdiff -m --resource 'Show.PaneMergedView:true' --style keramik -O -M %merged %orig %new" |
|
Back to top |
|
|
Jimbow Guru
Joined: 18 Feb 2003 Posts: 597 Location: Silver City, NM
|
Posted: Sat Aug 09, 2003 8:08 pm Post subject: |
|
|
I've been using xxdiff too. Works great. _________________ After Perl everything else is just assembly language. |
|
Back to top |
|
|
rjtupas n00b
Joined: 26 Jul 2003 Posts: 59 Location: Coronado, CA USA
|
Posted: Sat Aug 16, 2003 6:27 am Post subject: What about "using_editor=0" |
|
|
I've made the changes discussed in the first post. Do I need to edit the "using_editor=0" line in /etc/etc-config if I am using gtkdiff?
TIA,
Randy |
|
Back to top |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Thu Oct 16, 2003 1:53 am Post subject: |
|
|
Tkdiffb, which is part of the tkcvs package, makes a nice graphical merge tool, and it integrates well with etc-update.
Although I have to say, I like the way meld works - a bit confusing at first, but the linked scrolling is pure magic! |
|
Back to top |
|
|
Lasitus Apprentice
Joined: 05 Oct 2002 Posts: 188 Location: Orlando, FL
|
Posted: Mon Feb 07, 2005 10:56 pm Post subject: |
|
|
Great idea! I have been wanting this but didn't looked into it personally. I got it to open etc-update as my user, but I don't have rights to write the file. (BTW, I am using kompare)
doesn't work for me. I have tried various things from setting the XAUTHORITY variable to the DISPLAY variable. From what it sounds like on this post, xhost +localhost should work. (No matter what I have tried, root cannot use the display)
I am using:
to switch to root before running etc-update. I have also tried
Code: | DISPLAY=":0.0" sudo etc-update |
What am I missing? |
|
Back to top |
|
|
Lasitus Apprentice
Joined: 05 Oct 2002 Posts: 188 Location: Orlando, FL
|
Posted: Wed Feb 09, 2005 5:16 pm Post subject: |
|
|
Hmm, didn't notice this post was from 2003... Well I got it display kompare by not using sudo. I got a whole mess of errors though it seemed to work. |
|
Back to top |
|
|
xentric Guru
Joined: 16 Mar 2003 Posts: 410 Location: Netherlands
|
Posted: Wed Feb 09, 2005 7:27 pm Post subject: |
|
|
The user who started X should run "xhost +localhost" and that user should
also belong to the wheel group, otherwise he/she cannot su to root.
You could also try sux (emerge sux) instead of su! I've heard from lot's of
people that sux just works when su fails under X. _________________ When all else fails, read the manual...
Registered Linux User #340626 |
|
Back to top |
|
|
xentric Guru
Joined: 16 Mar 2003 Posts: 410 Location: Netherlands
|
Posted: Wed Feb 09, 2005 7:27 pm Post subject: |
|
|
double... _________________ When all else fails, read the manual...
Registered Linux User #340626 |
|
Back to top |
|
|
Lasitus Apprentice
Joined: 05 Oct 2002 Posts: 188 Location: Orlando, FL
|
Posted: Fri Feb 11, 2005 1:58 am Post subject: |
|
|
Yeah, I wasn't in the wheel group. I was using:
to change over to root. After joining the wheel group and just doing this instead:
I was able to get it to work. The only thing is kompare gave some gui related errors as root. It did seem to work ok though. |
|
Back to top |
|
|
j-m Retired Dev
Joined: 31 Oct 2004 Posts: 975
|
Posted: Fri Feb 11, 2005 2:02 am Post subject: |
|
|
Why don´t you use dispatch-conf? If you emerge app-text/rcs you will have a complete history of your config files at your hand... |
|
Back to top |
|
|
FreeManAtomic Guru
Joined: 01 Feb 2005 Posts: 365
|
Posted: Wed Apr 13, 2005 7:36 pm Post subject: |
|
|
Hi,
I done the changes, but don't work.
When start the etc-update command i always see a text-version
Sorry for my english |
|
Back to top |
|
|
Tinitus Veteran
Joined: 20 Sep 2004 Posts: 1754
|
Posted: Wed Apr 27, 2005 6:23 pm Post subject: |
|
|
Hello,
I tried the things from the 1st Posting ...
but I always get :
eg. /usr/sbin/etc-update: line 242: "gtkdiff: command not found
Why
R R |
|
Back to top |
|
|
its1louder Tux's lil' helper
Joined: 03 Jul 2003 Posts: 75 Location: Santa Barbara CA
|
Posted: Mon May 16, 2005 7:25 pm Post subject: |
|
|
Tinitus wrote: |
but I always get :
eg. /usr/sbin/etc-update: line 242: "gtkdiff: command not found
n
R R |
I have this problem too. I can't figure it out. I tried using meld and gtkdiff. I also tried copying meld and gtkdiff to the /usr/sbin/ directory and also putting in line 242 /usr/bin/meld instead of just meld. Neither worked. Sure wish they did. _________________ These go to eleven. |
|
Back to top |
|
|
badgers l33t
Joined: 04 Sep 2003 Posts: 680 Location: Madison, WI
|
Posted: Fri May 20, 2005 1:56 am Post subject: |
|
|
j-m wrote: | Why don´t you use dispatch-conf? If you emerge app-text/rcs you will have a complete history of your config files at your hand... |
could you expand a little about what you use?
I have used dispatch -conf but it is also a command line utility.
I am really all for a GUI interface to make config file updating much more intuitive. _________________ Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)
2.6.17 Suspend2 kernel with no scsi support |
|
Back to top |
|
|
xentric Guru
Joined: 16 Mar 2003 Posts: 410 Location: Netherlands
|
Posted: Fri May 20, 2005 5:48 am Post subject: |
|
|
Quote: | I am really all for a GUI interface to make config file updating much more intuitive. |
You can try app-portage/cfg-update for GUI updating of your config files...
Just read the install instructions and don't forget to run "cfg-update --fix" if you
have problems starting the GUI tools as root.
The next version (1.8) will also support 3-way merging with GUI tools, so it
can auto-update a lot more. _________________ When all else fails, read the manual...
Registered Linux User #340626 |
|
Back to top |
|
|
badgers l33t
Joined: 04 Sep 2003 Posts: 680 Location: Madison, WI
|
Posted: Mon May 23, 2005 11:50 am Post subject: |
|
|
thank you _________________ Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)
2.6.17 Suspend2 kernel with no scsi support |
|
Back to top |
|
|
|