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

Re: [PATCH] svn diff -r1:BASE URL asserts

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-01-13 01:39:00 CET

>>>>>diff -r1:BASE file:///home/BURBA/REPOS/SIG5
>>>>>Assertion failed: ! svn_path_is_url (path2), [...]

Paul Burba wrote:
> Anyway, here is my proposed fix. The "opt_state->start_revision.kind ==
> svn_opt_revision_base" isn't absolutely necessary since this case is
> caught in svn_client__get_revision_number(), but it seems more appropriate
> to check it here.

My first reaction is: "What is special about BASE?" Why isn't handled the same
as PREV and COMMITTED which are the other two revision keywords that require a WC?

It would be good to make BASE and PREV and COMMITTED all produce the same
error, preferably by all being handled at the same point. At present, PREV and
COMMITTED produce:

svn diff -r1:PREV file:///home/julianfoad/tmp/vcs/sandbox/trunk
svn: 'file:///home/julianfoad/tmp/vcs/sandbox' is not a working copy

- Julian

> Index: subversion/svn/diff-cmd.c
> ===================================================================
> --- subversion/svn/diff-cmd.c (revision 18079)
> +++ subversion/svn/diff-cmd.c (working copy)
> @@ -155,6 +155,13 @@
> return svn_error_createf (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> _("Target lists to diff may not contain
> "
> "both working copy paths and URLs"));
> +
> + /* Diff -rBASE:xxxx | rxxxx:BASE URL is invalid. */
> + if (url_present
> + && (opt_state->start_revision.kind == svn_opt_revision_base
> + || opt_state->end_revision.kind == svn_opt_revision_base))
> + return svn_error_create
> + (SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED, NULL, NULL);
>
> if (opt_state->start_revision.kind == svn_opt_revision_unspecified
> && working_copy_present)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 13 01:42:41 2006

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.