"Peter N. Lundblad" <peter@famlundblad.se> writes:
> Fix svn st -u, so that it shows repository locks for added files. Also, fix
> an URI-decoding bug in the status code.
>
> * subversion/libsvn_wc/status.c (assemble_status): URI-decode absolute
> FS path before looking it up in the repos_locks hash.
> (tweak_statushash): Add repos_lock argument and use it. Callers updated.
> (find_dir_url): New function.
> (close_file): Find repository lock for added files and set it.
>
>
> Index: subversion/libsvn_wc/status.c
> ===================================================================
> --- subversion/libsvn_wc/status.c (revision 13749)
> +++ subversion/libsvn_wc/status.c (arbetskopia)
> @@ -975,6 +978,7 @@
> /* Use the public API to get a statstruct, and put it into the hash. */
> /* ### lundblad TODO: Make sure lock info is added. */
> SVN_ERR (svn_wc_status (&statstruct, path, NULL, pool));
> + statstruct->repos_lock = repos_lock;
> apr_hash_set (statushash, apr_pstrdup (pool, path),
> APR_HASH_KEY_STRING, statstruct);
> }
Maybe you can lose that TODO now?
> @@ -1083,7 +1087,30 @@
> return f;
> }
>
> +/* REturns the URL for DB, or NULL: */
^^^ "Returns".
> +static const char *
> +find_dir_url (const struct dir_baton *db, apr_pool_t *pool)
> +{
> + /* If we have no name, we're the root, return the anchor URL. */
> + if (! db->name)
> + return db->edit_baton->anchor_status->entry->url;
> + else
> + {
> + const char *url;
> + struct dir_baton *pb = db->parent_baton;
> + svn_wc_status_t *status = apr_hash_get (pb->statii, db->name,
> + APR_HASH_KEY_STRING);
> + if (status && status->entry)
> + return status->entry->url;
>
> + url = find_dir_url (pb, pool);
> + if (url)
> + return svn_path_url_add_component (url, db->name, pool);
> + else
> + return NULL;
> + }
> +}
> +
This function could stand a more memory-conscious calling discipline,
but I doubt this will be the straw that break's the client machine's
back.
I think the patch is otherwise fine.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 29 22:52:37 2005