Bug 27235

Summary: mergemaster needlessly confusing
Product: Base System Reporter: roelof <roelof>
Component: confAssignee: Doug Barton <dougb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description roelof 2001-05-09 21:00:01 UTC
	

Mergemaster describes the information it is manipulating in various
ways, which looks to me unnecessary and asking for trouble,

For example, a cut&paste from a session:

=======
  Use 'd' to delete the temporary ./etc/login.conf
  Use 'i' to install the temporary ./etc/login.conf
  Use 'm' to merge the old and new versions
  Use 'v' to view to differences between the old and new versions again

# $FreeBSD: src/etc/login.conf,v 1.34 | # $FreeBSD: src/etc/login.conf,v
1.34
%?
l:      use the left version
r:      use the right version

 #
-# $FreeBSD: src/etc/login.conf,v 1.34.2.2 2000/06/02 20:53:55 alfred Exp $
+# $FreeBSD: src/etc/login.conf,v 1.34.2.3 2001/02/27 20:40:41 obrien Exp $
 #
=======

These snippets should illuminate my point. First the user gets
confronted with temporary versus, presumably, untemporary or permanent.
Yet also with old and new versions. From it seems to follow that
the new version is temporary.

Then when you've come across a new, temporary, version of an old and
supposedly untemporary file from which you would like to install
the new version with that one or so changes you made intact it
confronts you with the left/right terminology!

Small matter you say, for the context clarifies which is which. Alas.
In the example given for those line I would like to install the lower,
to coin a frase. Yet the distinctive markings are past the "v 1.34"
characters which are all that get displayed.

Even though I do know that in this case I would like to go with the
newer or temporary or even lower version, I do not know whether that
is the left or right version.

So what's a mere human to do?

Fix: 

Quite simple actually. Make a choice in a terminology and stick with
that. Be it left, lower, older, temporary or just plain "A".

Concistency is the key to simplicity. Given the context I would pick
'new' and 'old' as operative words. Which would get to...

Unfortunately, it should be done by someone who is absolutely sure
which is which; an that ain't me.
How-To-Repeat: 
	
wait till the next upgrade and run mergemaster
Comment 1 dd freebsd_committer freebsd_triage 2001-05-10 00:31:10 UTC
Responsible Changed
From-To: freebsd-bugs->dougb

Over to mergemaster maintainer.
Comment 2 DougB 2001-05-10 06:58:57 UTC
roelof@eboa.com wrote:

>   Use 'd' to delete the temporary ./etc/login.conf
>   Use 'i' to install the temporary ./etc/login.conf
>   Use 'm' to merge the old and new versions
>   Use 'v' to view to differences between the old and new versions again

	What do you think of this:

Use 'd' to delete the temporary ./etc/login.conf
Use 'i' to install the temporary ./etc/login.conf
Use 'm' to merge the temporary and installed versions
Use 'v' to view the diff results again
Comment 3 des 2001-05-10 13:26:33 UTC
roelof@eboa.com writes:
> Even though I do know that in this case I would like to go with the
> newer or temporary or even lower version, I do not know whether that
> is the left or right version.

The new version is on the right.

> So what's a mere human to do?

Read the merge(1) man page.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org
Comment 4 roelof 2001-05-10 16:44:13 UTC
Dag-Erling Smorgrav wrote:
> 
> roelof@eboa.com writes:
> > Even though I do know that in this case I would like to go with the
> > newer or temporary or even lower version, I do not know whether that
> > is the left or right version.
> 
> The new version is on the right.
> 
> > So what's a mere human to do?
> 
> Read the merge(1) man page.

Of course. Where else. What was I thinking. Reading the mergemaster(8)
to find out how mergemaster works.

There it's not to be found. To wit:

nisser:~$ /usr/bin/groff -S -man -Tascii /usr/src/usr.sbin/mergemaster/mergemaster.8 | egrep "( right| left)"
     mergemaster will source scripts that you specify right before it starts
nisser:~$

Mind you, that's more than merge(1) produces <g>:

nisser:~$ /usr/bin/groff -S -man -Tascii /usr/src/gnu/usr.bin/rcs/merge/merge.1 | egrep "( right| left)"
nisser:~$

Either way it misses the point. Which is that inconsistent naming
is a bad thing. How would you refer to source which has the habit
of dereferencing to come to the needed address using three or more
distinctly named variables?

I know how I would call it. But the last time I actually did - in a
public forum - it got, ehm, dereferenced in the neighbourhood of a
twirling cooling device ;).

Roelof

PS I would change it myself if I had the time. Which I don't. At least
not unallocated <g>.

-- 
_______________________________________________________________________
eBOA®                                               est. 1982
http://eBOA.com/                                    tel. +31-58-2123014
mailto:info@eBOA.com?subject=Information_request    fax. +31-58-2160293
Comment 5 roelof 2001-05-11 01:20:00 UTC
Doug Barton wrote:
> 
> roelof@eboa.com wrote:
> 
> >   Use 'd' to delete the temporary ./etc/login.conf
> >   Use 'i' to install the temporary ./etc/login.conf
> >   Use 'm' to merge the old and new versions
> >   Use 'v' to view to differences between the old and new versions again
> 
>         What do you think of this:
> 
> Use 'd' to delete the temporary ./etc/login.conf
> Use 'i' to install the temporary ./etc/login.conf
> Use 'm' to merge the temporary and installed versions
> Use 'v' to view the diff results again

I'm not truly happy with temporary. It indicates, justly so, it's
status; yet has the connotation of having less importance than
it actually has. In that sense proposed, I feel, would be
better. Coming from the FreeBSD team a proposal carries weight
that a temporary something does not.

Use 'd' to delete the proposed ./etc/login.conf
Use 'i' to install the proposed ./etc/login.conf
Use 'm' to merge the proposed and installed versions
Use 'v' to view the diff results again

Next the last line. I think:

Use 'v' to view the differences again

says enough in so little words that it's hard to misinterpret.

The biggest pain is in the interactive merging, though.

[hm. Maybe this works better when I press return]

Roelof

PS I'll get back to you on the merge part

-- 
_______________________________________________________________________
eBOA®                                               est. 1982
http://eBOA.com/                                    tel. +31-58-2123014
mailto:info@eBOA.com?subject=Information_request    fax. +31-58-2160293
Comment 6 roelof 2001-05-14 22:46:59 UTC
Doug Barton wrote:
> 
> roelof@eboa.com wrote:
> 
> >   Use 'd' to delete the temporary ./etc/login.conf
> > ...
>
>         What do you think of this:
> 
> Use 'd' to delete the temporary ./etc/login.conf
> ...


Ok, I'm currently biting the bullet so the this is a live comment.
What you didn't cover in the previous mail was the merging. Like
the mail/aliases. Mergemaster(8) makes no mention of either left
or right.

Which is a bit of a bummer since I've by now forgotten which was
what. But I've increased the width to 100 so it looks like right
is new and left is old.

Nonetheless...


How should I deal with this? [Leave it for later] m

# $FreeBSD: src/etc/mail/aliases,v 1.10.4.1 2 | # $FreeBSD: src/etc/mail/aliases,v 1.10.4.2 2
%?
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


would be clearer when stated something like

%?
l:      use the left or installed version
r:      use the right or newly suggested version


For sure it would. Even whilest merging this very file I had to
look up which was which.

Another suggestion is to add an option which would clear the screen
before presenting the next set. That would really help in determining
where the new set starts. Using less as pager I can of course do
that, but that takes a whole keypress.

Roelof

PS the typing was life, the sending not. Was busy <g>.

-- 
_______________________________________________________________________
eBOA®                                               est. 1982
http://eBOA.com/                                    tel. +31-58-2123014
mailto:info@eBOA.com?subject=Information_request    fax. +31-58-2160293
Comment 7 Doug Barton freebsd_committer freebsd_triage 2001-05-28 10:46:32 UTC
State Changed
From-To: open->analyzed


I committed the fix I proposed in the audit trail to -current, 
and will MFC it in time.
Comment 8 Doug Barton freebsd_committer freebsd_triage 2001-06-04 05:18:52 UTC
State Changed
From-To: analyzed->closed


Fix was MFC'ed