You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@wandisco.com> on 2010/06/28 11:33:10 UTC

Re: svn commit: r957917 - /subversion/trunk/subversion/libsvn_client/status.c

Bert Huijben wrote:
> Log:
> For consistency, make 'svn status -u --depth infinity' show what an
> 'svn update --depth infinity' would see, instead of also what an
> 'svn update --set-depth infinity' would bring into the working
> copy, by limiting the reporting to the recorded depth.

+1 on this functional change.

> If we want to show the additional items we should enable --set-depth
> on status -u.
> 
> In our test suite we explicitly test for this behavior as shown
> by the breakage caused by r957637.
> 
> * subversion/libsvn_client/status.c
>   (svn_client_status5): Pass svn_depth_unknow to svn_ra_status2().

(I edited: s/unknow/unknown/.)

We should document what depth "unknown" means on svn_client_status5().
Would something like the following work?

[[[
Index: subversion/include/svn_ra.h
===================================================================
--- subversion/include/svn_ra.h	(revision 958542)
+++ subversion/include/svn_ra.h	(working copy)
@@ -1153,11 +1153,14 @@
  * @a status_target is an optional single path component will restrict
  * the scope of the status report to an entry in the directory
  * represented by the @a session's URL, or empty if the entire directory
  * is meant to be examined.
  *
  * Get status only as deeply as @a depth indicates.
+ * If @a depth is #svn_depth_unknown, the editor will affect only the
+ * paths reported by the individual calls to svn_repos_set_path3() and
+ * svn_repos_link_path3().  See svn_repos_begin_report2() for details.
  *
  * The caller may not perform any RA operations using @a session
  * before finishing the report, and may not perform any RA operations
  * using @a session from within the editing operations of @a status_editor.
  *
]]]

Those lines are copied from the svn_repos_begin_report2() doc string and
I'm not sure they make enough sense here.  Better suggestions welcome.

- Julian


> Modified: subversion/trunk/subversion/libsvn_client/status.c
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_client/status.c (original)
> +++ subversion/trunk/subversion/libsvn_client/status.c Fri Jun 25 12:31:28 2010
> @@ -459,8 +459,8 @@ svn_client_status5(svn_revnum_t *result_
>            /* Do the deed.  Let the RA layer drive the status editor. */
>            SVN_ERR(svn_ra_do_status2(ra_session, &rb.wrapped_reporter,
>                                      &rb.wrapped_report_baton,
> -                                    target_basename, revnum, depth, editor,
> -                                    edit_baton, pool));
> +                                    target_basename, revnum, svn_depth_unknown,
> +                                    editor, edit_baton, pool));


Re: svn commit: r957917 - /subversion/trunk/subversion/libsvn_client/status.c

Posted by Julian Foad <ju...@wandisco.com>.
I (Julian Foad) wrote:
> We should document what depth "unknown" means on svn_client_status5().
> Would something like the following work?
> 
>   * Get status only as deeply as @a depth indicates.
> + * If @a depth is #svn_depth_unknown, the editor will affect only the
> + * paths reported by the individual calls to svn_repos_set_path3() and
> + * svn_repos_link_path3().  See svn_repos_begin_report2() for details.

Bah - we can use plain English.  This should be much better:

[[[
- * Get status only as deeply as @a depth indicates.
+ * Get status as deeply as @a depth indicates. If @a depth is
+ * #svn_depth_unknown, get the status down to the current depth of the
+ * working copy. If @depth is deeper than the working copy, include changes
+ * that would be needed to populate the working copy to that depth.
]]]

r958599.

Corrections/improvements welcome.

- Julian