Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Feb 2003 02:30:35 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Doug Barton <DougB@FreeBSD.org>
Cc:        Dag-Erling Smorgrav <des@ofug.org>, freebsd-hackers@FreeBSD.org
Subject:   Re: Modifying mergemaster behavior
Message-ID:  <p05200f4fba6513ae8982@[128.113.24.47]>
In-Reply-To: <20030203221928.S11438@12-234-22-23.pyvrag.nggov.pbz>
References:  <200301281844.h0SIie3G086935@repoman.freebsd.org> <p05200f24ba5c8412dcd1@[128.113.24.47]> <200301281908.h0SJ8OoY028183@apollo.backplane.com> <p05200f26ba5c85ee4c77@[128.113.24.47]> <20030201235429.G77226@12-234-22-23.pyvrag.nggov.pbz> <xzpy94xa6fb.fsf@flood.ping.uio.no> <20030203091128.Y4113@12-234-22-23.pyvrag.nggov.pbz> <p05200f4cba64ed4989d3@[128.113.24.47]> <20030203221928.S11438@12-234-22-23.pyvrag.nggov.pbz>

next in thread | previous in thread | raw e-mail | index | archive | help
At 10:36 PM -0800 2/3/03, Doug Barton wrote:
>On Mon, 3 Feb 2003, Garance A Drosihn wrote:
>  > I added:
>>          -I '$FreeBSD:.*$'
>  > to the 'diff ${DIFF_FLAG}' command in diff_loop, and it seems to
>  > have worked the way I wanted it to work.
>
>How did you want it to work?  (This isn't a rhetorical question.)

I do not care to see what the version-string is, and I certainly
don't need to see the two un-changing lines before and after the
version-string.  When you also count the diff-output line which
gives the line numbers of the change, that's a total of six lines
which appear on the screen and which give me (IMO) very little
useful information.

Try -I and watch how it behaves.  It isn't exactly what I was asking
for, but it is close enough that I think it would be a helpful step
forward from the present behavior.

>  > From my skimming of the script, I do not see how this change would
>  > cause problems for any other processing.
>
>What do you think mm should do if the only diff between two files
>is the cvs ID?

see below.

>  > I suppose we should also change the 'absolute diff first' part
>  > to include that, or people will be asked about merging a file,
>  > only to be shown a file which apparently has zero changes.
>
>I'm sorry, I don't understand exactly what you're getting at here.

There's a section of mergemaster that starts out with the comment
"Do an absolute diff first to see if the files are actually different".
What I was saying is we should add the same -I argument to that
diff command, so that if a file only differs by the version string,
then the "absolute diff" will not consider it a change.

In thinking about it now, I realize that I (personally) would
prefer that mergemaster would just install the file in that case,
but the result of adding the -I to that diff command is that the
file would be quietly skipped over.  I could live with that too,
but I'd feel better to have it automatically installed.  JMO.

>  > If so, my gut reaction is that if a lot of FreeBSD users are
>  > requesting this, then we should figure out how to make it
>  > happen -- one way or another.

What I was getting at is that mergemaster is going to be run fairly
often by a significant number of freebsd users.  If we need make some
changes to make that process more pleasant, then I think we should
feel free to do that.  If people aren't happy with how -I works, then
we should consider adding some different option to diff which will
do the job.

I would rather see a few lines added to diff, then having the
script do a bunch of back-flips and multiple runs of diff to get
the desired behavior.  I'd also prefer those lines added to diff
than to say "it's too hard to get the desired behavior, so let's
not bother".

>The request I actually get is that if the only diff is the cvs ID,
>that mm should do <X various things> with it.  Most commonly, just
>install the file (which I'm opposed to on principle, and by
>fundamental mm design).

Mergemaster has the -'i' option to automatically install new files.
Perhaps the same option could control whether it automatically
installs files where the only change is to the version string
which is in a comment line.

>Trying to deal rationally with this scenario is why I'd have to
>add at least one more diff to the process.
>
>1. Are the cvs id's different?
>2. If so, is that the only difference?  <--- new
>3. If cvs ID is not the only diff, display that to the user.

What I would ideally like is some option to diff where diff itself
understands what a version-string is, and it prints out a header
line that includes the version-string change.  But the way -I
works is fairly close to what I want, and is probably less
objectionable than adding some rather specialized option to diff.

>  > I'd also note that the separator line (=====) is usually scrolled
>>  off the window for me.  Not much point to a good eye-catching line
>>  if the line is usually not on the screen.
>
>That's actually a good thing. [...]  Passing it to PAGER when the
>diff already fills a page is a waste of screen space.

That line is more useful to me than the six lines of space used up
by telling me that the file is now 1.7.12 instead of 1.7.10.  This
is my opinion.  Other people have theirs, this one is mine.

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05200f4fba6513ae8982>