On Mon, Jul 27, 2009 at 06:21:03PM -0700, David Glasser wrote:
> On Fri, Jul 24, 2009 at 11:07 AM, Daniel Näslund<daniel_at_longitudo.com> wrote:
> > Hey!
> > This is my first attempt as a Subversion coder. Please be nice to me!
> > It works for patch(1) but I haven't tried it on any other patch programs.
> > Some background on the subject:
> > http://subversion.tigris.org/ds/viewMessage.do?dsMessageId=977146&dsForumId=462
> > / Daniel Näslund
> > [[[
> > Fix part of issue 1493: Property diffs/merge should use libsvn_diff.
> > For properties I have removed the diff headers and replaced the @@-characters
> > with ##.
> Out of curiosity... why? Aren't people used to seeing "@@" for diff
> headers? Shouldn't the "file-level" headers make it clear that it's a
> prop diff?
We don't want patch(1) to see a diff it will try to apply.
We want it to ignore the property diff, because it's just for human
consumption. There is no file on the file system which the property
diff would apply to. patch(1) will however still try to be helpful
and ask what to do even if it can't find a diff header. But that just
gets in the way when people want to apply the diff for file contents
to their working copy.
$ cat /tmp/test.diff
@@ -1 +1 @@
$ patch -p0 < /tmp/test.diff
missing header for unified diff at line 1 of patch
can't find file to patch at input line 1
Perhaps you used the wrong -p or --strip option?
File to patch:
To avoid this prompt we're changing the hunk header symbols.
Received on 2009-07-28 19:05:59 CEST