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

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

From: Uwe Stuehler <subversion-lists_at_bsdx.de>
Date: Sun, 13 Jun 2010 18:25:00 +0200

While testing all kinds of silly argument combinations to find
inconsistencies in argument handling I found this case where checkout
reports a bogus error that covers up the real error.

$ cd /path/to/wc
$ svn status ^/ foo
subversion/svn/status-cmd.c:250: (apr_err=155010)
subversion/svn/util.c:1118: (apr_err=155010)
subversion/libsvn_client/cmdline.c:269: (apr_err=155010)
subversion/libsvn_client/cmdline.c:132: (apr_err=155010)
subversion/libsvn_client/util.c:270: (apr_err=155010)
subversion/libsvn_client/ra.c:422: (apr_err=155010)
subversion/libsvn_client/url.c:106: (apr_err=155010)
subversion/libsvn_client/url.c:151: (apr_err=155010)
subversion/libsvn_wc/node.c:432: (apr_err=155010)
subversion/libsvn_wc/wc_db.c:4588: (apr_err=155010)
subversion/libsvn_wc/wc_db.c:4580: (apr_err=155010)
svn: The node '/path/to/wc/foo' was not found.

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:

$ svn status ^/ foo
subversion/svn/status-cmd.c:323: (apr_err=155022)
subversion/svn/util.c:960: (apr_err=155022)
subversion/libsvn_client/status.c:267: (apr_err=155022)
svn: Path 'file:///path/to/repo' is not a working copy path

I realize that it is still as likely that this particular routine will
break again in the future if more error codes are introduced, but...

Oh, and this not only affects "status", but also checkout and others.

I would be happy if someone could look at this and maybe verify that
this is the right fix for the time being.

Cheers,
Uwe
Received on 2010-06-13 18:26:09 CEST

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