[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn diff --svnpatch & svn patch

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-09-08 17:44:29 CEST

On 9/8/07, Charles Acknin <charlesacknin@gmail.com> wrote:
> On 9/7/07, David Glasser <glasser@davidglasser.net> wrote:
> > On 9/2/07, Charles Acknin <charlesacknin@gmail.com> wrote:
> > > So, for now, svn patch only cares about the svnpatch block of a patch.
> > > Which means although you can feed it with a unidiff+svnpatch input
> > > (like for example the output that comes right out from 'svn diff
> > > --svnpatch'), it seeks to the svnpatch header and starts reading from
> > > here. This is because I -- we? -- haven't yet come to a solution
> > > regarding "How do we deal with Unidiff in Subversion?". I'd like to
> > > take the opportunity of this post to open the talk on this matter.
> > > Yet, if you want to apply unidiff+svnpatch, you'll have to run both
> > > 'svn patch' and your favorite patch tool (like GNU patch(1)). Let the
> >
> > Hmm, maybe the answer here is to have some sort of "svn patch
> > --ignore-textdelta" (with a much better name) so that what you would
> > do is run both "svn patch --ignore-textdelta" and patch(1) in series?
> > (And wrap that in a shell script.)
>
> 'svn patch' already ignores the textdelta (unidiff). Maybe I wasn't
> clear enough with "it seeks to the svnpatch header and starts reading
> from here". Let me try to clarify. When you feed 'svn patch' with a
> unidiff+svnpatch output, it ignores the unidiff and reads the
> svnpatch.
>
> So, suppose my output (svn diff --svnpatch) is like the following:
>
> [[[
> Property changes on: .
> ___________________________________________________________________
> Name: myprop
> + myprop value
>
> Index: README
> ===================================================================
> --- README (revision 26482)
> +++ README (working copy)
> @@ -80,3 +80,4 @@
> Finally, be sure to see Appendix A in the Subversion Book. It
> contains a very quick overview of the major differences between
> CVS and Subversion.
> +blabla
> ========================= SVNPATCH1 BLOCK =========================
> eJzTUMgvSM3TLcrPL1HQUDCySjFQ0ARCDYXkjMS89FTdlMwi3YKi/AKYpJlVbiWUb2gEY5cl5pSm
> gvWBdebkF4M1ohkIFk5NyQRZBBICAKENIqA=
> ]]]
>
> then 'svn patch' starts reading right after the svnpatch header, i.e.
> at 'eJzTUMgv..' bytes.

Hmm. So, what I mean is, the "+ blabla" change is also encoded inside
the 'eJzTUMgvSM3TLcrPL' bytes, right? And 'svn patch' will apply that
change (based on the svnpatch1 block)? So my suggestion is an option
that makes 'svn patch' skip the textdeltas *inside the svnpatch block*
so that you can apply them with patch(1) in case you've edited them.

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Sep 8 17:41:15 2007

This is an archived mail posted to the Subversion Dev mailing list.