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

Patch submission + help request

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2001-01-24 17:54:54 CET

Howdy, all.

Attached is my first attempt at a code patch EVER. In theory, it is a
fix for the behavior that Bill Tutt was allegedly seeing in Windows
where path names were looking like c:\foo\bar\/baz.

Here's the deal-io, though. I'm having a non-trivial amount of
problems building under Windows (mostly APR's fault), so I need to
focus some attention on that little hell before moving on in the code
base.

If you are a regular Windows-bound Subversion compiler/user and have
seen the behavior mentioned above, please apply this patch and let me
know if it fixes the problem. And if you have any hints in getting
APR to build pleasantly...I'm listening.

Meanwhile, I'll be in the trenches with MS Visual C++ 6.0.

* config.hw (SVN_PATH_LOCAL_SEPARATOR): Added #define for local
    path separators (used in Windows).
* configure.in (SVN_PATH_LOCAL_SEPARATOR): Added #define for local
    path separators (presumed to be used only in Unix with ./configure).
* svn_path.h (SVN_PATH_URL_SEPARATOR, SVN_PATH_REPOS_SEPARATOR): We
    round out our path separator #defines by #include-ing config.h,
    adding a #define for url path separators.
* path.c (get_separator_from_style): Added a new internal function for
    determining the path separator character from a given path style.
    Several other functions in this file changed to make use of this
    (instead of just always using the repos separator type).

Index: config.hw
===================================================================
RCS file: /cvs/subversion/config.hw,v
retrieving revision 1.2
diff -c -r1.2 config.hw
*** config.hw 2000/12/21 23:09:31 1.2
--- config.hw 2001/01/24 15:16:44
***************
*** 45,50 ****
--- 45,54 ----
  # define SVN_CLIENT_PATCH "X:/path/to/patch.exe"
  #endif
  
+ /* Path separator for local filesystem */
+ #ifndef SVN_PATH_LOCAL_SEPARATOR
+ # define SVN_PATH_LOCAL_SEPARATOR '\\'
+ #endif
  
  #endif /* CONFIG_HW */
  
Index: configure.in
===================================================================
RCS file: /cvs/subversion/configure.in,v
retrieving revision 1.45
diff -c -r1.45 configure.in
*** configure.in 2001/01/10 00:08:00 1.45
--- configure.in 2001/01/24 15:16:44
***************
*** 175,180 ****
--- 175,183 ----
  AC_DEFINE_UNQUOTED(SVN_CLIENT_PATCH, "$SVN_CLIENT_PATCH",
          [Define to be the full path to your patch program])
  
+ dnl Since this is used only on Unix-y systems, define the path
separator as '/'
+ AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
+ [Defined to be the path separator used on your local
filesystem])
  
  dnl Pass some config data ----------------------------
  
Index: subversion/include/svn_path.h
===================================================================
RCS file: /cvs/subversion/subversion/include/svn_path.h,v
retrieving revision 1.25
diff -c -r1.25 svn_path.h
*** subversion/include/svn_path.h 2000/12/26 18:37:46 1.25
--- subversion/include/svn_path.h 2001/01/24 15:16:45
***************
*** 23,30 ****
  
  #include <apr_pools.h>
  #include "svn_string.h"
  
-
  
  /*** Notes:
   *
--- 23,30 ----
  
  #include <apr_pools.h>
  #include "svn_string.h"
+ #include "config.h"
  
  
  /*** Notes:
   *
***************
*** 32,46 ****
   * path is a file or directory, because we always canonicalize() it.
   *
   * todo: this library really needs a test suite!
   *
   ***/
  
  enum svn_path_style {
    svn_path_local_style = 1, /* parse path using local (client)
conventions */
    svn_path_repos_style, /* parse path using repository
conventions */
    svn_path_url_style /* parse path using URL conventions */
  };
-
  
  /* Add a COMPONENT (a null-terminated C-string) to PATH.
  
--- 32,64 ----
   * path is a file or directory, because we always canonicalize() it.
   *
   * todo: this library really needs a test suite!
+ *
+ * todo: Though we have a notion of different types of separators for
+ * the local path style, there currently is no logic in place to
+
Received on Sat Oct 21 14:36:19 2006

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.