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

Re: svn commit: r1197998 - in /subversion/trunk/subversion: libsvn_client/patch.c tests/cmdline/patch_tests.py

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 6 Nov 2011 11:55:34 +0100

On Sun, Nov 06, 2011 at 03:28:06AM +0400, Konstantin Kolinko wrote:
> Second, regarding the test case in this commit:
> The sample patch in the test case is not fair that it does not match
> to what "svn diff --git" or Git generates.

That doesn't matter.
The filename "/dev/null" is returned from the diff parser to
the patch code. The patch code decides what to do with "/dev/null".
Your suggestions don't make a difference to what's being tested.

> Another test I would like to see is to use the patch format as generated by Git.
> Note that
> - headers are a bit different
> - additional "index..." line
> - file modes are "100644" instead of "10644"; no revision numbers

All unrelated to the "/dev/null" problem.

If you want to add tests to the git-diff parser, extend the following
file, not the high-level patch tests:

> - paths start with "a/" and not "a/trunk"
> Thus it is to be applied with "--strip 1".

This is something where git and Subversion have to differ.
Subversion has to express paths relative to the repository root.
Otherwise, copyfrom would be ambiguous. This is documented in the 1.7
release notes.

If you need to apply patches generated with 'svn diff --git' to a git
tree, you may need to edit the patch to make the number of path components
match up (e.g. change "a/branches/mybranch/..." to "a/mybranch...").
I don't like this but so far we found no good solution to this problem.
Ideas and patches welcome :)

Another problem is that copyfrom headers in the diff output currently
don't show the copyfrom revision.

In general, 'svn diff --git' is still work in progress and not as useful
yet as we'd like it to be. We've postponed further work on it to a future
Received on 2011-11-06 11:56:14 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.