On 10/1/05, Philip Martin <philip@codematters.co.uk> wrote:
> Ivan Zhakov <chemodax@gmail.com> writes:
>
> > On 10/1/05, Philip Martin <philip@codematters.co.uk> wrote:
> >>
> >> Pass the directory path instead of SVN_WC_THIS_DIR.
> > In this case I will get full path for prop file. It's inconveniently
> > because for writing log I need relative path. Therefore I need remove
> > it by ugly logic similar to svn_wc__merge_props().
>
> Move the "ugly logic" into a function and have both places call it.
You really think so? For me removing path from computed path is
errorful and darkly:
<<
[snip]
const char *access_path = svn_wc_adm_access_path (adm_access);
int access_len = strlen (access_path);
/* Empty path and paths ending in / don't need an extra slash removed */
if (access_len == 0 || access_path[access_len - 1] == '/')
slash = 0;
else
slash = 1;
[snip]
/* Compute pathnames for the "mv" log entries. Notice that these
paths are RELATIVE pathnames (each beginning with ".svn/"), so
that each .svn subdir remains separable when executing run_log(). */
tmp_props = apr_pstrdup (pool, local_prop_tmp_path + access_len + slash);
real_props = apr_pstrdup (pool, local_propfile_path + access_len + slash);
>>
Also this code assumes that how svn_wc__prop_path() makes it's path.
Why we need interpret things that just joined? Why our wc code wories
about slash characters?
--
Ivan Zhakov
Received on Sat Oct 1 01:24:18 2005