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

Re: [PATCH] Use absolute paths in the libsvn_wc status callbacks

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Tue, 1 Sep 2009 15:40:44 +0100

Hyrum K. Wright wrote:
> This is a half-done patch which alters the status callback to return
> absolute paths instead of relative paths.
[...]

> Index: subversion/svn/status.c
> ===================================================================
> [...]
> @@ -365,13 +366,26 @@ svn_error_t *
> svn_boolean_t repos_locks,
> apr_pool_t *pool)
> {
> + const char *path_prefix;
> + const char *path_local;
> +
> if (! status
> || (skip_unrecognized && !(status->entry || status->tree_conflict))
> || (status->text_status == svn_wc_status_none
> && status->repos_text_status == svn_wc_status_none))
> return SVN_NO_ERROR;
>
> - return print_status(svn_dirent_local_style(path, pool),
> + apr_filepath_get((char **)&path_prefix, 0 /* flags */, pool);
> + path_local = svn_dirent_is_child(path_prefix, local_abspath, pool);
> + if (!path_local)
> + {
> + if (strcmp(local_abspath, path_prefix) == 0)
> + path_local = ".";
> + else
> + path_local = local_abspath;
> + }
> +
> + return print_status(svn_dirent_local_style(path_local, pool),
> detailed, show_last_committed, repos_locks, status,
> pool);
> }

Whoever's working on this, you will move this convert-to-relative code
into a helper function to share among all 'svn' commands, won't you?

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2389778
Received on 2009-09-01 16:41:17 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.