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

[PATCH] svn diff -r1:BASE URL asserts

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-01-12 22:12:01 CET

kfogel@newton.ch.collab.net wrote on 12/23/2005 12:36:16 PM:

> Paul Burba <paulb@softlanding.com> writes:
> > I'd be glad to look into it, with one caveat: I'm on vacation next
week so
> > I probably won't get to it until the first week of January. If this
is
> > minor enough to wait until then I can do it.
>
> I think that's fine -- a mis-handled error condition, however
> egregious, is not in the same class as, say, a dataloss bug :-).
>
> -Karl
>
> --
> www.collab.net <> CollabNet | Distributed Development On Demand
>
>
> > > -Karl
> > >
> > > > C:\home\BURBA\WCS\SIG5>C:\SVN\src-trunk.collabnet.
> > > trunk\Release\subversion\svn\svn.exe
> > > > diff -r1:BASE file:///home/BURBA/REPOS/SIG5
> > > > Assertion failed: ! svn_path_is_url (path2), file
> > > > C:\SVN\src-trunk.collabnet.trunk\subversion\libsvn_client\diff.c,
line
> >
> > > > 2117
> > > >
> > > > This application has requested the Runtime to terminate it in an
> > unusual
> > > > way.
> > > > Please contact the application's support team for more
information.
> > > >
> > > > I didn't find any mention of this in the issue tracker.
> > > >
> > > > If it matters, this build is of r17918 on XP Pro 5.1 SP2
> > > >
> > > > Paul B.

Karl,

Sorry I didn't have time to get at this last week, I've been busy hunting
down an iSeries optimization bug in our 1.3.0 port.

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.

Paul B.

[[[
Stop svn diff 1:BASE URL from asserting and provide a more useful error
msg.

* subversion/svn/diff-cmd.c
   (svn_cl__diff): If the starting or ending revision against a URL is
BASE
    return an error.
]]]

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)

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 12 23:37:50 2006

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