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

Re: [PATCH] svn status ^/ foo: The node '/path/to/wc/foo' was not found.

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Wed, 16 Jun 2010 16:31:54 +0100

On Mon, 2010-06-14 at 03:44 +0200, Uwe Stuehler wrote:
> On 06/13/10 06:25 PM, Uwe Stuehler wrote:
> > Index: subversion/libsvn_client/cmdline.c
> > ===================================================================
> > --- subversion/libsvn_client/cmdline.c (revision 953325)
> > +++ subversion/libsvn_client/cmdline.c (working copy)
> > @@ -123,6 +123,7 @@ check_root_url_of_target(const char **root_url,
> > * argument.
> > */
> > if ((err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
> > + || (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
> > || (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY))
> > {
> > svn_error_clear(err);
> >
> > With this change svn_cl__status() actually makes it past the
> > argument parsing phase:
>
> Sorry, replying to myself since I forgot to include a log message.
>
> [[[
> Fix handling of non-WC paths in presence of repository relative URLs
>
> * subversion/libsvn_client/cmdline.c:
> (check_root_url_of_target): Catch a new error constant for paths
> that are not registered in a working copy, and thereby allow the
> argument processing to continue as expected.
>
> Patch by: Uwe Stuehler (subversion-lists_at_bsdx.de)
> ]]]
>
> Actually, in the example that I used in my previous mail:
>
> $ cd /path/to/wc
> $ svn status ^/ foo

Your example is a bit unclear because it does (for me at least) generate
a sensible error message:

[[[
$ svn st ^/ foo
svn: The node '/home/julianfoad/src/subversion-a/foo' was not found.
]]]

However, if I specify an existing file instead of 'foo' I get a much
clearer indication of a bug:

[[[
$ svn st ^/ COMMITTERS
/home/julianfoad/src/subversion-a/subversion/libsvn_client/cmdline.c:320: (apr_err=235000)
svn: In file '/home/julianfoad/src/subversion-a/subversion/libsvn_subr/dirent_uri.c' line 1641: assertion failed (! svn_path_is_url(relative))
Aborted
]]]

When I try your patch (above), *both* of these commands fail with that
assertion failure. Can you try them?

If you don't get an assertion failure, check that you are compiling with
assertions enabled ("configure --enable-maintainer-mode" should do it).

> As far as I understood the purpose of check_root_url_of_target(),
> it is applied in order to make sure that if ^/ is being used, all
> other arguments refer to the same repository. Is that correct?

Yes.

> (That got me a bit confused, since I previously assumed that ^/
> is always expanded to the repository URL of the current working
> directory and not based on any other arguments that I supply.)

(Hmm, I thought it was documented somewhere, but it doesn't seem to be
documented properly in the book.)

> Even though 'foo' is not under SVN control and does not exist yet,
> the argument points to a path *inside* the current working copy.
> So I wonder: shouldn't it be possible to retrieve the repository
> URL of that (nonexistent) path anyway? It would be possible to
> infer this from the parent directory ("." in this case).

Well, yes, and some commands do that. "svn update foo" is one example:
even if "foo" doesn't exist on disk, it looks in the WC metadata to see
if it can update it.

But that's a completely different subject, I think.

- Julian
Received on 2010-06-16 17:32:36 CEST

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.