[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] --forward mostly harmless

From: David Allouche
Subject: Re: [Gnu-arch-users] --forward mostly harmless
Date: Mon, 13 Sep 2004 19:38:41 +0200

On Mon, 2004-09-13 at 12:46 -0400, Aaron Bentley wrote:
> Miles Bader wrote:
> > No, just that I need duplicate suppression.
> > 
> > I generally use star-merge --three-way, but I've always sort of counted on
> > being able to use --forward if necessary -- star-merge isn't appropriate for
> > every merging task.  In particular, apply-delta and replay would benefit 
> > from
> > some sort duplicate suppression, as they're the sort of primitive command 
> > one
> > often turns to when star-merge doesn't work.
> It might be possible to do it this way:
> make a scratch copy of the file, and apply the patch backwards.  The 
> rejects will be anything that doesn't apply backwards.
> Take the rejects and apply them backwards (which is really forwards, wrt 
> the original patch) to the original copy of the file.

I have not thought much about the potential failure modes of that
approach, but it did press a red button.

>From the "Applying Reversed Patches" info page:

        This method cannot detect a reversed patch if it is a normal
        diff and the first command is an append (which should have been
        a delete) since appends always succeed, because a null context
        matches anywhere.  But most patches add or change lines rather
        than delete them, so most reversed normal diffs begin with a
        delete, which fails, and `patch' notices.

At least, the approach you propose will cause deletes to always be
ignored. Well, maybe we do need something smarter than patch(1).

It the meantime, let us just delete the --forward option. It's cruft.

                                                            -- ddaa

reply via email to

[Prev in Thread] Current Thread [Next in Thread]