You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/07/07 12:03:20 UTC
svn commit: r1143742 - in /subversion/trunk/subversion: libsvn_wc/info.c
tests/cmdline/info_tests.py
Author: rhuijben
Date: Thu Jul 7 10:03:19 2011
New Revision: 1143742
URL: http://svn.apache.org/viewvc?rev=1143742&view=rev
Log:
Following up on r1143726, make calling 'svn info' on a not-present node
an error again.
* subversion/libsvn_wc/info.c
(found_entry_baton): Add boolean.
(info_found_node_callback): Error out on a root node that doesn't have
information.
(svn_wc__get_info): Initialize new boolean in baton.
* subversion/tests/cmdline/info_tests.py
(info_show_exclude): Update expected result.
Modified:
subversion/trunk/subversion/libsvn_wc/info.c
subversion/trunk/subversion/tests/cmdline/info_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/info.c?rev=1143742&r1=1143741&r2=1143742&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/info.c (original)
+++ subversion/trunk/subversion/libsvn_wc/info.c Thu Jul 7 10:03:19 2011
@@ -327,6 +327,7 @@ struct found_entry_baton
void *receiver_baton;
svn_wc__db_t *db;
svn_boolean_t actual_only;
+ svn_boolean_t first;
/* The set of tree conflicts that have been found but not (yet) visited by
* the tree walker. Map of abspath -> svn_wc_conflict_description2_t. */
apr_hash_t *tree_conflicts;
@@ -349,7 +350,18 @@ info_found_node_callback(const char *loc
kind, scratch_pool, scratch_pool));
if (info == NULL)
- return SVN_NO_ERROR; /* not present or server excluded node */
+ {
+ if (!fe_baton->first)
+ return SVN_NO_ERROR; /* not present or server excluded descendant */
+
+ /* If the info root is not found, that is an error */
+ return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+ _("The node '%s' was not found."),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+ }
+
+ fe_baton->first = FALSE;
SVN_ERR_ASSERT(info->wc_info != NULL);
SVN_ERR(fe_baton->receiver(fe_baton->receiver_baton, local_abspath,
@@ -431,6 +443,7 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
fe_baton.receiver_baton = receiver_baton;
fe_baton.db = wc_ctx->db;
fe_baton.actual_only = fetch_actual_only;
+ fe_baton.first = TRUE;
fe_baton.tree_conflicts = apr_hash_make(scratch_pool);
fe_baton.pool = scratch_pool;
Modified: subversion/trunk/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/info_tests.py?rev=1143742&r1=1143741&r2=1143742&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/info_tests.py Thu Jul 7 10:03:19 2011
@@ -471,13 +471,14 @@ def info_show_exclude(sbox):
sbox.simple_rm('iota')
sbox.simple_commit()
- # Expect no output for iota (status = not-present)
- # ### BH: This should give the same error as below!
- svntest.actions.run_and_verify_svn(None, [], [], 'info', iota)
+ # Expect error on iota (status = not-present)
+ svntest.actions.run_and_verify_svn(None, [],
+ 'svn: E200009: Could not display info for all targets.*',
+ 'info', iota)
sbox.simple_update()
- # Expect error iota
+ # Expect error on iota (unversioned)
svntest.actions.run_and_verify_svn(None, [],
'svn: E200009: Could not display info for all targets.*',
'info', iota)