Re: Q: mergemaster 'm'-merge option results in empty file

2003-09-16 Thread Rob Lahaye


Thank you so much for the long and detailed description.
I'm waiting for the first release candidate of 4.9 to test
it out.
(BTW: RC1 should have been there already; is there a delay?).

Regards,
Rob.

Matthew Seaman wrote:
 On Sun, Sep 14, 2003 at 08:46:52PM +0900, Rob Lahaye wrote:
 
 
What is left and right in the mergemaster context???
'man sdiff' doesn't seem to help out here.
I've tried a bit (I typed 'v' and 'q'), but then found /etc/hosts
totally empty!!

Any idea where I went wrong?
 
 
 'sdiff' does a side-by-side comparison of two files, and lets you
 generate a file where some or all of those differences have been
 merged together.  'left' and 'right' in this context refer to the two
 columns that sdiff divides the screen into, where it shows you the
 blocks of lines that differ between the two files you're comparing.
 
 Perhaps an example is in order.  Run these commands to get two
 different versions of the GENERIC kernel configuration from cvs:
[...]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Q: mergemaster 'm'-merge option results in empty file

2003-09-14 Thread Rob Lahaye


Hi,

I'm trying to get grip of mergemaster.
Either my logic is up-side-down or mergemaster is not so intuitive,
but learning mergemaster seems a tough process for me.
My problem now:

	# mergemaster -v

This does some things, and then presents me a list of files that
are only in my installed /etc directory. Ok, understand that.
It then also takes me file by file to make a decision as:

  Use 'd' to delete the temporary ./etc/hosts
  Use 'i' to install the temporary ./etc/hosts
  Use 'm' to merge the temporary and installed versions
  Use 'v' to view the diff results again
Using 'd' or 'i' works alright, but 'm' is totally uncomprehensive.
E.g. I want to merge with my original /etc/hosts file, which has
my own list of ips/hosts When typing 'm', I enter sdiff, which talks
about a left and a right version, totally out-of-the-blue:
%h
l:  use the left version
r:  use the right version
e l:edit then use the left version
e r:edit then use the right version
e b:edit then use the left and right versions concatenated
e:  edit a new version
s:  silently include common lines
v:  verbosely include common lines
q:  quit
What is left and right in the mergemaster context???
'man sdiff' doesn't seem to help out here.
I've tried a bit (I typed 'v' and 'q'), but then found /etc/hosts
totally empty!!
Any idea where I went wrong?

Thanks,
Rob.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Q: mergemaster 'm'-merge option results in empty file

2003-09-14 Thread Matthew Seaman
On Sun, Sep 14, 2003 at 08:46:52PM +0900, Rob Lahaye wrote:

 What is left and right in the mergemaster context???
 'man sdiff' doesn't seem to help out here.
 I've tried a bit (I typed 'v' and 'q'), but then found /etc/hosts
 totally empty!!
 
 Any idea where I went wrong?

'sdiff' does a side-by-side comparison of two files, and lets you
generate a file where some or all of those differences have been
merged together.  'left' and 'right' in this context refer to the two
columns that sdiff divides the screen into, where it shows you the
blocks of lines that differ between the two files you're comparing.

Perhaps an example is in order.  Run these commands to get two
different versions of the GENERIC kernel configuration from cvs:

# cd /tmp
# fetch -o GENERIC-CURRENT 
'http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/i386/conf/GENERIC?rev=1.246.2.51.2.2content-type=text/plain'
# fetch -o GENERIC-STABLE 
'http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/i386/conf/GENERIC?rev=1.246.2.54content-type=text/plain'

(As the names suggest, those are just the latest versions from the
HEAD and RELENG_4 branches)

Now, assuming you're in an xterm or similar, stretch the window until
it is at least 160 characters wide.  If you're in a fixed width
window, substitute the width of the window for the number after '-w'
below.  It's clearer to see what's going on if you can use as wide a
screen as possible.  Now run:

# setenv EDITOR=vi
# sdiff -o GENERIC.n -s -w 160 GENERIC-STABLE GENERIC-CURRENT

The first output you will see is:

# $FreeBSD: /repoman/r/ncvs/src/sys/i386/conf/GENERIC,v 1.246.2.54 2003/04/28 | # 
$FreeBSD: /repoman/r/ncvs/src/sys/i386/conf/GENERIC,v 1.246.2.51.2.2 2003/0
%

(Which probably won't make a lot of sense unless your mail client
doesn't automatically wrap long lines and you happen to be reading
this in a fairly wide screen)

What this is doing is asking which $FreeBSD$ tag should go into the
merged file.  Choose 'l' for the left-hand version, which comes from
GENERIC-STABLE. If you're in a narrow window, you probably can't
see the difference between those two lines as it's too far over to be
displayed.

The next chunk looks like:

  
# FireWire support
device  firewire# FireWire bus code   
device  sbp # SCSI over FireWire (Requires scbus and da)  
device  fwe # Ethernet over FireWire (non-standard!)  
%

because the firewire support is only in the GENERIC-STABLE kernel config.

Here, choose 'r' for the right hand version which comes from
GENERIC-CURRENT.

What you should end up with is a new file GENERIC.n where:

% diff -u GENERIC-STABLE GENERIC.n
--- GENERIC-STABLE  Mon Apr 28 04:41:46 2003
+++ GENERIC.n   Sun Sep 14 16:51:22 2003
@@ -264,8 +264,3 @@
 device aue # ADMtek USB ethernet
 device cue # CATC USB ethernet
 device kue # Kawasaki LSI USB ethernet
-
-# FireWire support
-device firewire# FireWire bus code
-device sbp # SCSI over FireWire (Requires scbus and da)
-device fwe # Ethernet over FireWire (non-standard!)

and

% diff -u GENERIC-CURRENT GENERIC.n
--- GENERIC-CURRENTTue Mar 25 23:35:15 2003
+++ GENERIC.n   Sun Sep 14 16:51:22 2003
@@ -15,7 +15,7 @@
 # device lines is also present in the ./LINT configuration file. If you are
 # in doubt as to the purpose or necessity of a line, check first in LINT.
 #
-# $FreeBSD: /repoman/r/ncvs/src/sys/i386/conf/GENERIC,v 1.246.2.51.2.2 2003/03/25 
23:35:15 jhb Exp $
+# $FreeBSD: /repoman/r/ncvs/src/sys/i386/conf/GENERIC,v 1.246.2.54 2003/04/28 
03:41:46 simokawa Exp $
 
 machinei386
 cpuI386_CPU


One thing that may trip you up: don't set your $EDITOR variable to
'emacs' -- because of the way emacs works by immediately copying the
temporary file sdiff(1) generates, and renaming the original as a
backup, it confuses sdiff(1), and you won't see any of your edits in
the output.  vi(1) just works directly on the temporary file and all
is well.  

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature