Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-25 Thread Julian Foad
On Fri, 2010-10-22, scott mc wrote:
 We've run into another issue on Haiku, perhaps it's just something I
 did wrong when configuring it, seems the subversion port on Haiku
 thinks the system uses ISO-8859-15 encoding:
 http://ports.haiku-files.org/ticket/422
 Haiku's locale kit is still evolving, so perhaps something wasn't
 detected correcting during the configure?  Any ideas on what to look
 for?

Hi scott.  I suggest you start looking at the function
svn_cmdline_init() in subversion/libsvn_subr/cmdline.c.

- Julian




Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-25 Thread Philip Martin
Julian Foad julian.f...@wandisco.com writes:

 On Fri, 2010-10-22, scott mc wrote:
 We've run into another issue on Haiku, perhaps it's just something I
 did wrong when configuring it, seems the subversion port on Haiku
 thinks the system uses ISO-8859-15 encoding:
 http://ports.haiku-files.org/ticket/422
 Haiku's locale kit is still evolving, so perhaps something wasn't
 detected correcting during the configure?  Any ideas on what to look
 for?

 Hi scott.  I suggest you start looking at the function
 svn_cmdline_init() in subversion/libsvn_subr/cmdline.c.

Or the regression tests in subversion/tests/libsvn_subr/utf-test.c.

-- 
Philip


Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-22 Thread scott mc
 Patch by: Scott McCreary scott...@gmail.com (HaikuPorts)
 Found by: Chris Roberts cpr...@gmail.com (HaikuPorts)

 Committed in r1024558.  Thanks!

 --
 Philip


Thanks Philip.
We've run into another issue on Haiku, perhaps it's just something I
did wrong when configuring it, seems the subversion port on Haiku
thinks the system uses ISO-8859-15 encoding:
http://ports.haiku-files.org/ticket/422
Haiku's locale kit is still evolving, so perhaps something wasn't
detected correcting during the configure?  Any ideas on what to look
for?

-scottmc


Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-20 Thread Philip Martin
scott mc scott...@gmail.com writes:

 Here's the updated patch vs. svn r1022152, feel free to add a
 reviewed by to the message below.
 Thanks,
 -scottmc

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

 Patch by: Scott McCreary scott...@gmail.com (HaikuPorts)
 Found by: Chris Roberts cpr...@gmail.com (HaikuPorts)

Committed in r1024558.  Thanks!

-- 
Philip


Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-13 Thread Gavin Beau Baumanis
Ping. This submission has received no responses in over a week.


Gavin Beau Baumanis


On 05/10/2010, at 5:21 AM, scott mc wrote:

 I've attached the 1.6.12 patch and the 1.7.xx-svn patches.
 -scottmc
 
 Scott McCreary
 HaikuPorts
 
 
 This time as in-line text:
 
 ---1.6.12.patch
 
 diff -urN subversion-1.6.12/subversion/libsvn_subr/config_file.c
 subversion-1.6.12-haiku/subversion/libsvn_subr/config_file.c
 --- subversion-1.6.12/subversion/libsvn_subr/config_file.c2009-11-25
 09:27:35.047972352 -0800
 +++ subversion-1.6.12-haiku/subversion/libsvn_subr/config_file.c  
 2010-03-15
 22:59:57.0 -0700
 @@ -32,6 +32,11 @@
 
 #include svn_private_config.h
 
 +#ifdef __HAIKU__
 +#  include FindDirectory.h
 +#  include StorageDefs.h
 +#endif
 +
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR
 
 @@ -326,7 +331,19 @@
  SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
 
 -#else  /* ! WIN32 */
 +#elif defined(__HAIKU__)
 +{
 +  char folder[B_PATH_NAME_LENGTH];
 +
 +  status_t error = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false,
 +  folder, sizeof(folder));
 +  if (error)
 +return SVN_NO_ERROR;
 +
 +  *path_p = svn_path_join_many(pool, folder,
 +   SVN_CONFIG__SYS_DIRECTORY, fname, NULL);
 +}
 +#else  /* ! WIN32  !__HAIKU__ */
 
   *path_p = svn_path_join_many(pool, SVN_CONFIG__SYS_DIRECTORY, fname, NULL);
 
 @@ -1115,8 +1132,21 @@
 *path = svn_path_join_many(pool, folder,
SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
 +
 +#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_path_join_many(pool, folder,
 + SVN_CONFIG__USR_DIRECTORY, fname, NULL);
 +}
 +#else  /* ! WIN32  !__HAIKU__ */
 
 -#else  /* ! WIN32 */
   {
 const char *homedir = svn_user_get_homedir(pool);
 if (! homedir)
 diff -urN subversion-1.6.12/subversion/libsvn_subr/config_impl.h
 subversion-1.6.12-haiku/subversion/libsvn_subr/config_impl.h
 --- subversion-1.6.12/subversion/libsvn_subr/config_impl.h2009-01-27
 05:23:50.045350912 -0800
 +++ subversion-1.6.12-haiku/subversion/libsvn_subr/config_impl.h  
 2010-03-15
 22:39:34.0 -0700
 @@ -109,7 +109,10 @@
or svn_config_get_user_config_path() instead. */
 #ifdef WIN32
 #  define SVN_CONFIG__SUBDIRECTORYSubversion
 -#else  /* ! WIN32 */
 +#elif defined __HAIKU__ /* HAIKU */
 +#  define SVN_CONFIG__SYS_DIRECTORY   subversion
 +#  define SVN_CONFIG__USR_DIRECTORY   subversion
 +#else  /* ! WIN32  ! __HAIKU__ */
 #  define SVN_CONFIG__SYS_DIRECTORY   /etc/subversion
 #  define SVN_CONFIG__USR_DIRECTORY   .subversion
 #endif /* WIN32 */
 
 
 
 -1.7.xx-svn.patch
 Index: libsvn_subr/config_file.c
 ===
 --- subversion-1.7.xx-svn/subversion/libsvn_subr/config_file.c
 (revision
 1002735)
 +++ subversion-1.7.xx-svn/subversion/libsvn_subr/config_file.c
 (working copy)
 @@ -38,6 +38,11 @@
 
 #include svn_private_config.h
 
 +#ifdef __HAIKU__
 +#  include FindDirectory.h
 +#  include StorageDefs.h
 +#endif
 +
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR
 
 @@ -331,8 +336,20 @@
SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
 
 -#else  /* ! WIN32 */
 +#elif defined(__HAIKU__)
 +  {
 +char folder[B_PATH_NAME_LENGTH];
 
 +status_t error = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false,
 +folder, sizeof(folder));
 +if (error)
 +  return SVN_NO_ERROR;
 +
 +*path_p = svn_dirent_join_many(pool, folder,
 +   SVN_CONFIG__SYS_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__ */
 +
 +  {
 const char *homedir = svn_user_get_homedir(pool);
 if (! homedir)
   return SVN_NO_ERROR;
 Index: libsvn_subr/config_impl.h
 

Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-13 Thread Philip Martin
Gavin Beau Baumanis gav...@thespidernet.com writes:

 --- subversion-1.7.xx-svn/subversion/libsvn_subr/config_impl.h   
 (revision
 1002735)
 +++ subversion-1.7.xx-svn/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__SUBDIRECTORYSubversion
 -#else  /* ! WIN32 */
 +#elif defined __HAIKU__ /* HAIKU */
 #  define SVN_CONFIG__SYS_DIRECTORY   subversion
 +#  define SVN_CONFIG__USR_DIRECTORY   subversion
 +#else  /* ! WIN32  ! __HAIKU__ */
 +#  define SVN_CONFIG__SYS_DIRECTORY   /etc/subversion
 #  define SVN_CONFIG__USR_DIRECTORY   .subversion
 #endif /* WIN32 */

This bit doesn't apply, it's obviously wrong.  Scott, please send a
clean patch for trunk.

-- 
Philip


Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-13 Thread scott mc
Here's the updated patch vs. svn r1022152, feel free to add a
reviewed by to the message below.
Thanks,
-scottmc

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

Patch by: Scott McCreary scott...@gmail.com (HaikuPorts)
Found by: Chris Roberts cpr...@gmail.com (HaikuPorts)

--
Index: subversion/libsvn_subr/config_file.c
===
--- subversion/libsvn_subr/config_file.c(revision 1022152)
+++ subversion/libsvn_subr/config_file.c(working copy)
@@ -38,6 +38,11 @@

 #include svn_private_config.h

+#ifdef __HAIKU__
+#  include FindDirectory.h
+#  include StorageDefs.h
+#endif
+
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR

@@ -331,8 +336,20 @@
SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }

-#else  /* ! WIN32 */
+#elif defined(__HAIKU__)
+  {
+char folder[B_PATH_NAME_LENGTH];

+status_t error = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false,
+folder, sizeof(folder));
+if (error)
+  return SVN_NO_ERROR;
+
+*path_p = svn_dirent_join_many(pool, folder,
+   SVN_CONFIG__SYS_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__ */
+
+  {
 const char *homedir = svn_user_get_homedir(pool);
 if (! homedir)
   return SVN_NO_ERROR;
Index: subversion/libsvn_subr/config_impl.h
===
--- subversion/libsvn_subr/config_impl.h(revision 1022152)
+++ subversion/libsvn_subr/config_impl.h(working copy)
@@ -114,7 +114,10 @@
or svn_config_get_user_config_path() instead. */
 #ifdef WIN32
 #  define SVN_CONFIG__SUBDIRECTORYSubversion
-#else  /* ! WIN32 */
+#elif defined __HAIKU__ /* HAIKU */
+#  define SVN_CONFIG__SYS_DIRECTORY   subversion
+#  define SVN_CONFIG__USR_DIRECTORY   subversion
+#else  /* ! WIN32  ! __HAIKU__ */
 #  define SVN_CONFIG__SYS_DIRECTORY   /etc/subversion
 #  define SVN_CONFIG__USR_DIRECTORY   .subversion
 #endif /* WIN32 */


Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-04 Thread scott mc
Philip,

On Thu, Sep 30, 2010 at 9:53 AM, Philip Martin
philip.mar...@wandisco.com wrote:
 scott mc scott...@gmail.com writes:

 On Wed, Sep 29, 2010 at 5:45 PM, Philip Martin
 philip.mar...@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__SUBDIRECTORYSubversion
 -#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


Re: [PATCH] for building subversion 1.6.12 for haiku

2010-10-04 Thread scott mc
I've attached the 1.6.12 patch and the 1.7.xx-svn patches.
 -scottmc

 Scott McCreary
 HaikuPorts


This time as in-line text:

---1.6.12.patch

diff -urN subversion-1.6.12/subversion/libsvn_subr/config_file.c
subversion-1.6.12-haiku/subversion/libsvn_subr/config_file.c
--- subversion-1.6.12/subversion/libsvn_subr/config_file.c  2009-11-25
09:27:35.047972352 -0800
+++ subversion-1.6.12-haiku/subversion/libsvn_subr/config_file.c
2010-03-15
22:59:57.0 -0700
@@ -32,6 +32,11 @@

 #include svn_private_config.h

+#ifdef __HAIKU__
+#  include FindDirectory.h
+#  include StorageDefs.h
+#endif
+
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR

@@ -326,7 +331,19 @@
  SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }

-#else  /* ! WIN32 */
+#elif defined(__HAIKU__)
+{
+  char folder[B_PATH_NAME_LENGTH];
+
+  status_t error = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false,
+  folder, sizeof(folder));
+  if (error)
+return SVN_NO_ERROR;
+
+  *path_p = svn_path_join_many(pool, folder,
+   SVN_CONFIG__SYS_DIRECTORY, fname, NULL);
+}
+#else  /* ! WIN32  !__HAIKU__ */

   *path_p = svn_path_join_many(pool, SVN_CONFIG__SYS_DIRECTORY, fname, NULL);

@@ -1115,8 +1132,21 @@
 *path = svn_path_join_many(pool, folder,
SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
+
+#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_path_join_many(pool, folder,
+ SVN_CONFIG__USR_DIRECTORY, fname, NULL);
+}
+#else  /* ! WIN32  !__HAIKU__ */

-#else  /* ! WIN32 */
   {
 const char *homedir = svn_user_get_homedir(pool);
 if (! homedir)
diff -urN subversion-1.6.12/subversion/libsvn_subr/config_impl.h
subversion-1.6.12-haiku/subversion/libsvn_subr/config_impl.h
--- subversion-1.6.12/subversion/libsvn_subr/config_impl.h  2009-01-27
05:23:50.045350912 -0800
+++ subversion-1.6.12-haiku/subversion/libsvn_subr/config_impl.h
2010-03-15
22:39:34.0 -0700
@@ -109,7 +109,10 @@
or svn_config_get_user_config_path() instead. */
 #ifdef WIN32
 #  define SVN_CONFIG__SUBDIRECTORYSubversion
-#else  /* ! WIN32 */
+#elif defined __HAIKU__ /* HAIKU */
+#  define SVN_CONFIG__SYS_DIRECTORY   subversion
+#  define SVN_CONFIG__USR_DIRECTORY   subversion
+#else  /* ! WIN32  ! __HAIKU__ */
 #  define SVN_CONFIG__SYS_DIRECTORY   /etc/subversion
 #  define SVN_CONFIG__USR_DIRECTORY   .subversion
 #endif /* WIN32 */



-1.7.xx-svn.patch
Index: libsvn_subr/config_file.c
===
--- subversion-1.7.xx-svn/subversion/libsvn_subr/config_file.c  (revision
1002735)
+++ subversion-1.7.xx-svn/subversion/libsvn_subr/config_file.c  (working copy)
@@ -38,6 +38,11 @@

 #include svn_private_config.h

+#ifdef __HAIKU__
+#  include FindDirectory.h
+#  include StorageDefs.h
+#endif
+
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR

@@ -331,8 +336,20 @@
SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }

-#else  /* ! WIN32 */
+#elif defined(__HAIKU__)
+  {
+char folder[B_PATH_NAME_LENGTH];

+status_t error = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false,
+folder, sizeof(folder));
+if (error)
+  return SVN_NO_ERROR;
+
+*path_p = svn_dirent_join_many(pool, folder,
+   SVN_CONFIG__SYS_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__ */
+
+  {
 const char *homedir = svn_user_get_homedir(pool);
 if (! homedir)
   return SVN_NO_ERROR;
Index: libsvn_subr/config_impl.h
===
--- subversion-1.7.xx-svn/subversion/libsvn_subr/config_impl.h  (revision
1002735)
+++ subversion-1.7.xx-svn/subversion/libsvn_subr/config_impl.h  (working copy)
@@ -114,8 +114,11 @@
or svn_config_get_user_config_path() instead. */
 #ifdef WIN32
 #  define 

Re: [PATCH] for building subversion 1.6.12 for haiku

2010-09-30 Thread Philip Martin
scott mc scott...@gmail.com writes:

 On Wed, Sep 29, 2010 at 5:45 PM, Philip Martin
 philip.mar...@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.

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

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


Re: [PATCH] for building subversion 1.6.12 for haiku

2010-09-29 Thread Stefan Sperling
On Wed, Sep 29, 2010 at 07:37:27AM -0700, scott mc wrote:
 Here is the patch we use for building subversion on Haiku.
 -scottmc
 
 Scott McCreary
 HaikuPorts

Unfortunately this mailing list appears to be silently dropping
attachments in some cases. Can you try again with a .txt extension?

Also, would it be possible for you to send a patch that's relative
to Subversion's trunk code, rather than 1.6.12?

Thanks,
Stefan


Re: [PATCH] for building subversion 1.6.12 for haiku

2010-09-29 Thread scott mc
 Unfortunately this mailing list appears to be silently dropping
 attachments in some cases. Can you try again with a .txt extension?

 Also, would it be possible for you to send a patch that's relative
 to Subversion's trunk code, rather than 1.6.12?

 Thanks,
 Stefan


Sure.  Here it is vs. subversion-svn-r-1002716. (also attaching as a
.patch and a .txt in case either of those work better)
-scottmc

Scott McCreary
HaikuPorts



Index: subversion/libsvn_subr/config_file.c
===
--- subversion/libsvn_subr/config_file.c(revision 1002716)
+++ subversion/libsvn_subr/config_file.c(working copy)
@@ -38,6 +38,11 @@

 #include svn_private_config.h

+#ifdef __HAIKU__
+#  include FindDirectory.h
+#  include StorageDefs.h
+#endif
+
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR

@@ -331,7 +336,19 @@
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_p = svn_path_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);

@@ -1116,8 +1133,21 @@
 *path = svn_dirent_join_many(pool, folder,
  SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
+
+#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_path_join_many (pool, folder,
+   
SVN_CONFIG__USR_DIRECTORY, fname, NULL);
+}
+#else  /* ! WIN32  !__HAIKU__ */

-#else  /* ! WIN32 */
   {
 const char *homedir = svn_user_get_homedir(pool);
 if (! homedir)
Index: subversion/libsvn_subr/config_impl.h
===
--- subversion/libsvn_subr/config_impl.h(revision 1002716)
+++ 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__SUBDIRECTORYSubversion
-#else  /* ! WIN32 */
+#elif defined __HAIKU__ /* HAIKU */
 #  define SVN_CONFIG__SYS_DIRECTORY   /etc/subversion
+#  define SVN_CONFIG__USR_DIRECTORY   subversion
+#else  /* ! WIN32  ! __HAIKU__ */
+#  define SVN_CONFIG__SYS_DIRECTORY   /etc/subversion
 #  define SVN_CONFIG__USR_DIRECTORY   .subversion
 #endif /* WIN32 */
Index: subversion/libsvn_subr/config_file.c
===
--- subversion/libsvn_subr/config_file.c(revision 1002716)
+++ subversion/libsvn_subr/config_file.c(working copy)
@@ -38,6 +38,11 @@
 
 #include svn_private_config.h
 
+#ifdef __HAIKU__
+#  include FindDirectory.h
+#  include StorageDefs.h
+#endif
+
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR
 
@@ -331,7 +336,19 @@
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_p = svn_path_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);
 
@@ -1116,8 +1133,21 @@
 *path = svn_dirent_join_many(pool, folder,
  SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
+  
+#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_path_join_many (pool, folder,
+   
SVN_CONFIG__USR_DIRECTORY, fname, NULL);
+}
+#else  /* ! WIN32  !__HAIKU__ */
 
-#else  /* ! WIN32 */
   {
 const char *homedir = svn_user_get_homedir(pool);
 if (! homedir)
Index: subversion/libsvn_subr/config_impl.h
===
--- subversion/libsvn_subr/config_impl.h(revision 

Re: [PATCH] for building subversion 1.6.12 for haiku

2010-09-29 Thread scott mc
On Wed, Sep 29, 2010 at 5:45 PM, Philip Martin
philip.mar...@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.

Patch by: Scott McCreary scott...@gmail.com (HaikuPorts)
Found by: Chris Roberts cpr...@gmail.com (HaikuPorts)
Review by:

---
 http://subversion.apache.org/docs/community-guide/conventions.html#log-messages

 Please use spaces rather than tabs for indentation.

 Index: subversion/libsvn_subr/config_file.c
 ===
 --- subversion/libsvn_subr/config_file.c  (revision 1002716)
 +++ subversion/libsvn_subr/config_file.c  (working copy)
 @@ -38,6 +38,11 @@

  #include svn_private_config.h

 +#ifdef __HAIKU__
 +#include FindDirectory.h
 +#include StorageDefs.h
 +#endif
 +
  /* Used to terminate lines in large multi-line string literals. */
  #define NL APR_EOL_STR

 @@ -331,7 +336,19 @@
 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_p = svn_path_join_many (pool, folder,
 + 
 SVN_CONFIG__USR_DIRECTORY, fname, NULL);

 Why is that using SVN_CONFIG__USR_DIRECTORY?  Should that be __SYS_?

Using __USR_ seems to have the desired effect, perhaps I'm using it
wrong.  See other reply below.


 +}
 +#else  /* ! WIN32  !__HAIKU__ */

*path_p = svn_dirent_join_many(pool, SVN_CONFIG__SYS_DIRECTORY, fname, 
 NULL);

 @@ -1116,8 +1133,21 @@
  *path = svn_dirent_join_many(pool, folder,
   SVN_CONFIG__SUBDIRECTORY, fname, NULL);
}
 +
 +#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_path_join_many (pool, folder,
 + 
 SVN_CONFIG__USR_DIRECTORY, fname, NULL);
 +}
 +#else  /* ! WIN32  !__HAIKU__ */

 -#else  /* ! WIN32 */
{
  const char *homedir = svn_user_get_homedir(pool);
  if (! homedir)
 Index: subversion/libsvn_subr/config_impl.h
 ===
 --- subversion/libsvn_subr/config_impl.h  (revision 1002716)
 +++ 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__SUBDIRECTORYSubversion
 -#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.

 +#  define SVN_CONFIG__USR_DIRECTORY   subversion
 +#else  /* ! WIN32  ! __HAIKU__ */
 +#  define SVN_CONFIG__SYS_DIRECTORY   /etc/subversion
  #  define SVN_CONFIG__USR_DIRECTORY   .subversion
  #endif /* WIN32 */


 --
 Philip



Attached is an updated version of the patch, fixing the tabs/spaces
issue, and a renamed function that I caught.
-scottmc



Index: libsvn_subr/config_file.c
===
--- libsvn_subr/config_file.c   (revision 1002735)
+++ libsvn_subr/config_file.c   (working copy)
@@ -38,6 +38,11 @@

 #include svn_private_config.h

+#ifdef __HAIKU__
+#  include FindDirectory.h
+#  include StorageDefs.h
+#endif
+
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR

@@ -331,8 +336,20 @@
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_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,