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

Issue #2873, diff for a single added file

From: Martin Hauner <martin.hauner_at_gmx.net>
Date: Sat, 9 Feb 2008 19:03:17 +0100

Hi,

i am looking at issue 2873 (http://subversion.tigris.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).

--
Martin

Subcommander 2.0.0 beta, 1.2.2, http://subcommander.tigris.org
a cross platform Win32/Unix/MacOSX subversion GUI client & diff/merge
tool.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-02-09 19:03:20 CET

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