On Mon, 7 Oct 2002, Martin Cooper wrote:
> Date: Mon, 7 Oct 2002 12:44:01 -0700
> From: Martin Cooper <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: 'Struts Developers List' <[EMAIL PROTECTED]>
> Subject: RE: Selective diff?
>
>
>
> > -----Original Message-----
> > From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 07, 2002 12:32 PM
> > To: Struts Developers List
> > Subject: Selective diff?
> >
> >
> > Problem:
> >
> > I've got a pending patch on RequestUtils already for
> > selectApplication.
> > I also made another modification (added getApplicationPrefix
> > to return
> > the current module prefix) to RequestUtils while bringing the
> > validator
> > into 1.1-compliance. This means I have two different bugs I need to
> > pick certain changes out for selectively.
> >
> > Question:
> >
> > Is there a way I can tell cvs diff -u to give me just a
> > certain section
> > as a patch - or is it possible for me to modify the patch to
> > exclude the
> > already posted patch for selectApplication?
>
> I don't believe there's an option to 'cvs -diff' part of a file. It's
> possible that 'patch' has an option to only apply part of it, but I don't
> have cygwin installed here, so I can't check that.
>
> It's possible that you might be able to modify the patch file, but I've
> never tried it myself. You'd need to try it and verify that 'patch' does the
> right thing before you submit the patches.
>
It might be easier to follow a different pattern (assuming that the two
fixes are totally independent of each other):
* For patch #1, use "cvs diff -u" to create the diff for
just that patch.
* For patch #2, create *two* versions of the patch:
- Use "cvs diff -u" to create the diff from the current
version of the source (i.e. assumpe patch #1 is never
applied)
- Use regular "diff -u" to create a diff starting from
a local copy of the source *with* patch #1 applied.
* If you want to be nice, go back and do the reverse for patch #1
(create a diff starting from source+patch2)
That way, the patches can be applied in either order.
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>