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

Re: [PATCH] for building subversion 1.6.12 for haiku

From: scott mc <scottmc2_at_gmail.com>
Date: Mon, 4 Oct 2010 18:19:20 +0000

Philip,

On Thu, Sep 30, 2010 at 9:53 AM, Philip Martin
<philip.martin_at_wandisco.com> wrote:
> scott mc <scottmc2_at_gmail.com> writes:
>
>> On Wed, Sep 29, 2010 at 5:45 PM, Philip Martin
>> <philip.martin_at_wandisco.com> wrote:
>>
>>> Please write a log message:
>> ---------
>>

------------------------------------------------------------------------------------------------------
This patch makes use of find_directory() on Haiku to locate the proper
directories to use. Currently B_USER_SETTINGS_DIRECTORY points to
 /boot/home/config/settings, so this puts the .subversion directory in
 /boot/home/config/settings/subversion instead of $HOME/subversion or
$HOME/.subversion.

* subversion/libsvn_subr/config_file.c
  (svn_config__sys_config_path): Set the path on Haiku to point to
"B_COMMON_SETTINGS_DIRECTORY"
                                                + SVN_CONFIG__SYS_DIRECTORY
  (svn_config__usr_config_path): Set the path on Haiku to point to
"B_USER_SETTINGS_DIRECTORY"
                                               + SVN_CONFIG__USR_SUBDIRECTORY

 * subversion/libsvn_subr/config_impl.h:
    Set SVN_CONFIG__SYS_DIRECTORY and SVN_CONFIG__USR_DIRECTORY for Haiku

-------------------------------------------------------------------------------------------------

> We like the filename and functions to be explicitly specified:
>
> * subversion/libsvn_subr/config_file.c
> (svn_config__sys_config_path): What changed.
>
>>>> +++ subversion/libsvn_subr/config_impl.h (working copy)
>>>> @@ -114,8 +114,11 @@
>>>> or svn_config_get_user_config_path() instead. */
>>>> #ifdef WIN32
>>>> # define SVN_CONFIG__SUBDIRECTORY "Subversion"
>>>> -#else /* ! WIN32 */
>>>> +#elif defined __HAIKU__ /* HAIKU */
>>>> # define SVN_CONFIG__SYS_DIRECTORY "/etc/subversion"
>>>
>>> Should this be used in svn_config__sys_config_path?
>>>
>>
>> I'm unclear on what SVN_CONFIG__SYS_DIRECTORY is used for. Through
>> several attempts I was able to move the $HOME/.subversion directory to
>> /boot/home/config/settings/subversion which fits in better with how
>> Haiku stores users' settings. So I left SVN_CONFIG__SYS_DIRECTORY the
>> same as other OSes for now.
>
> Is Haiku multi-user? Does /boot/home/config/settings apply to one user
> or all users?
>

Haiku is single user, but plans to move to multi-user in the future.

> On Linux we have /etc/subversion for per-system settings that apply to
> all users, and $HOME/.subversion for per-user settings specific to
> each user.
>
> On Windows there are per-system and per-user registry settings as well
> as per-system and per-user directories.
>
>> -#else /* ! WIN32 */
>> +#elif defined(__HAIKU__)
>> + {
>> + char folder[B_PATH_NAME_LENGTH];
>>
>> + status_t error = find_directory(B_USER_SETTINGS_DIRECTORY, -1, false,
>> + folder, sizeof(folder));
>> + if (error)
>> + return SVN_NO_ERROR;
>> +
>> + *path_p = svn_dirent_join_many(pool, folder,
>> + SVN_CONFIG__USR_DIRECTORY, fname, NULL);
>> + }
>> +#else /* ! WIN32 && !__HAIKU__ */
>> +
>> *path_p = svn_dirent_join_many(pool, SVN_CONFIG__SYS_DIRECTORY, fname, NULL);
>>
>> #endif /* WIN32 */
>> @@ -1117,8 +1134,21 @@
>> SVN_CONFIG__SUBDIRECTORY, fname, NULL);
>> }
>>
>> -#else /* ! WIN32 */
>> +#elif defined(__HAIKU__)
>> {
>> + char folder[B_PATH_NAME_LENGTH];
>> +
>> + status_t error = find_directory(B_USER_SETTINGS_DIRECTORY, -1, false,
>> + folder, sizeof(folder));
>> + if (error)
>> + return SVN_NO_ERROR;
>> +
>> + *path = svn_dirent_join_many(pool, folder,
>> + SVN_CONFIG__USR_DIRECTORY, fname, NULL);
>> + }
>> +#else /* ! WIN32 && !__HAIKU__ */
>> +
>> + {
>
> These two functions are returning the same path. Is that what is intended?
>
> --
> Philip
>

Good point. I have updated the patch to put the USR files and SYS
files in their proper directories.
I was unsure about your coding style, as to where to break long lines,
so feel free to adjust any coding style violations I might have made.
I see that the function name is different between 1.6.12 and the
current svn, is that corrent? If this latest version looks ok, I'm
going to put together a 1.6.12 and add it into Haiku sometime this
week. I've attached the 1.6.12 patch and the 1.7.xx-svn patches.
-scottmc

Scott McCreary
HaikuPorts
Received on 2010-10-04 20:19:57 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.