Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Issue #2873, diff for a single added file

subversion
Discussion topic

Back to topic list

Issue #2873, diff for a single added file

Author Martin Hauner <martin dot hauner at gmx dot net>
Full name Martin Hauner <martin dot hauner at gmx dot net>
Date 2008-02-09 10:03:17 PST
Message Hi,

i am looking at issue 2873 (http://subversion.ti​gris.org/issues/show​_bug.cgi?id=2873
).
It is about creating a diff for a single added file. This currently
fails with a file doesn't
exist in revision error.

I have made a few small changes (described below) to make this work
for a simple
repos to repos diff for a file that doesn't exist in rev 0 and was
added in rev 1.

I would like to get some feedback if this an acceptable path.


My diff case is handled in diff_repos_repos which calls
diff_prepare_repos_repos, which
in turn calls svn_client__repos_locations.

There are two places where it fails. The first failures happens in
svn_client__repos_locations.
It tries find the path at the two revisions. That fails for the
revision without the file. I have
added a must_exist parameter which (if set to FALSE) makes it set the
missing location to
the same location as the other revision. This lets the method run
without failure.

The next error happens in diff_prepare_repos_repos after returning
from svn_client__repos_locations.
svn_ra_check_path is run on both locations. If the path check returns
svn_node_node
it fails. By disabling both svn_node_none checks, it returns the
wanted single added file patch.

I wonder why this check is there at all. Even if it is not what the
user wished to see, why
shouldn't svn create a diff against a revision where the path does not
(yet) exist?

Attached is a small patch with my changes (against 1.4.6).
Attachments

« Previous message in topic | 1 of 3 | Next message in topic »

Messages

Show all messages in topic

Issue #2873, diff for a single added file Martin Hauner <martin dot hauner at gmx dot net> Martin Hauner <martin dot hauner at gmx dot net> 2008-02-09 10:03:17 PST
     Re: Issue #2873, diff for a single added file julianfoad Julian Foad 2008-02-26 10:09:25 PST
         Re: Issue #2873, diff for a single added file Martin Hauner <martin dot hauner at gmx dot net> Martin Hauner <martin dot hauner at gmx dot net> 2008-04-27 04:52:30 PDT
Messages per page: