[MPlayer-dev-eng] printf -> mp_msg conversion (etc.), first patches

The Wanderer inverseparadox at comcast.net
Thu Jul 15 02:47:00 CEST 2004


Gyaaaah. I don't know why I bother...

The Wanderer wrote:

> D Richard Felker III wrote:
> 
>> On Sat, May 22, 2004 at 03:36:07PM -0400, The Wanderer wrote:

> Do any of the MSGTRs I mentioned need to be moved back to the souce 
> files to make an acceptable patch, or will making the
> MSGL_ERR-related changes be enough?

I still need an answer to this question in order to continue - or rather
I would, except that by this point if I ever resume the project I'm
liable to just start over from scratch.

I really don't *want* to abandon this, but at certain points (including
especially the early stages when I don't yet entirely have my feet under
me) I'm going to need feedback on exactly what I need to do differently;
if I'm not going to get it, I'm not going to be able to proceed.

>>> Should I separate the printf -> mp_msg changes and the string
>>> moves into different patches, in the future? Doing so would slow
>>> me down, since I would have to go through files twice (and,
>>> unless I've missed something, wait for the first to be committed
>>> before beginning work on the second), but it might be worth it.
>> 
>> IMO yes, they should be separate. It's not as hard as you think to
>> do it in 2 passes. Just look at the diff file for a list of
>> locations you need to go back to. Also you can just diff your two
>> edits directly, rather than using cvs diff, so you don't have to
>> wait to make the second patch set.
> 
> Actually, I'm making the diffs directly now, and the two types of
> changes were made in two passes for this patch as well; I just didn't
> remember to make a diff before starting the second pass. The trouble
> is that unless I make the second set of changes to a *third* copy of
> the source file, made after applying the first set of changes, the
> second diff will include all of the changes made in the first. It's
> bothersome enough (and IMO puts enough of a feels-unnecessary extra
> load on the CVS server) to keep two copies of the source tree, one
> for use (and making diffs against) and one for edits; I don't want to
> try to keep  three.
> 
> Or am I doing something completely wrong?

This has been bugging at me off and on, and I honestly don't understand
what you were suggesting I do. Here are the possibilities as I
understand them.

1) Make a copy of the CVS-tree source file, make (say) the MSG*_FISME
changes to it, make a diff. The resulting patch contains lines like

==
-     printf("foo");
+     mp_msg(MSGT_FIXME, MSGL_FIXME, "foo");
==

2) Make a second copy of the same source file, make the MSGTR changes,
make a diff of that. The resulting patch contains lines like

==
-     printf("foo");
+     printf(MSGTR_FOO);
==

After either of these patches has been applied, unless CVS is *much*
smarter than I think it is, the other one will either no longer apply
correctly or - at minimum - replace the changes which were made by the
first patch.

3) Make a copy of the CVS-tree source file, make the MSG*_FIXME changes
to it, make and submit a diff, make the MSGTR changes to the *same*
source file, make a second diff - which will duplicate all of the
changes in the previous patch, and will probably not apply correctly
because the lines to be changed no longer exist in their previous form.

I simply don't see any way, other than waiting to make the second
patch until after the first one has been applied, to get around either
of these. If there is one, I'd be very glad to know it.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

A government exists to serve its citizens, not to control them.




More information about the MPlayer-dev-eng mailing list