[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: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 01 Sep 2009 11:40:22 -0400

I thought we already code for converting absolute paths to relative ones.
See subversion/svn/notify.c:notify(), for example.

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?
>
> - Julian
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2389778

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2389793

Received on 2009-09-01 17:40:57 CEST

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