[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: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Tue, 1 Sep 2009 09:43:45 -0500

On Sep 1, 2009, at 9:40 AM, Julian Foad wrote:

> 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?

For the record, this is issue #3464 "relative path notification output":
http://subversion.tigris.org/issues/show_bug.cgi?id=3464

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2389779
Received on 2009-09-01 16:44:02 CEST

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