Michael W Thelen <firstname.lastname@example.org> writes:
> I have to apologize for letting this patch sit so long without being
> addressed. Would any developer be able to review Paul's patch? If not,
> I'll file an issue for in within a few days. Here is a link to Paul's
> patch in the archive:
Paul, +1 to commit. Here's a new patch, exactly the same as yours
except with a custom error message, because the generic one wouldn't
be clear in this scenario. The generic one just said "A path under
version control is needed for this operation", to which the creative
user might reply "But of course it's under version control, it's in
the repository!" :-)
Feel free to change the custom error message if you think of a better
phrasing, of course.
Return consistent error on svn diff of special revisions BASE, COMMITTED,
or PREV when operating on a URL.
The original impetus for this patch was to stop svn diff 1:BASE URL from
asserting, and to provide a more useful error message.
Approved by: kfogel
(svn_cl__diff): If the starting or ending revision against a URL is
BASE, COMMITTED, or PREV return an error.
--- subversion/svn/diff-cmd.c (revision 18760)
+++ subversion/svn/diff-cmd.c (working copy)
@@ -206,6 +206,21 @@
_("Target lists to diff may not contain "
"both working copy paths and URLs"));
+ /* Diffing special revisions BASE, COMMITTED, or PREV
+ against a URL is invalid. */
+ if (url_present
+ && (opt_state->start_revision.kind == svn_opt_revision_base
+ || opt_state->end_revision.kind == svn_opt_revision_base
+ || opt_state->start_revision.kind == svn_opt_revision_committed
+ || opt_state->end_revision.kind == svn_opt_revision_committed
+ || opt_state->start_revision.kind == svn_opt_revision_previous
+ || opt_state->end_revision.kind == svn_opt_revision_previous))
+ return svn_error_create
+ (SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED, NULL,
+ _("That symbolic revision name(s) is only for "
+ "working copy paths, not URLs"));
if (opt_state->start_revision.kind == svn_opt_revision_unspecified
opt_state->start_revision.kind = svn_opt_revision_base;
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Wed Mar 8 03:48:09 2006