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

[PATCH] Fix issue 618.

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2002-08-01 07:09:35 CEST

Here is a patch which solves issue #618. The reason it's not applied
is that it will break any existing working copies. On unix the
following script will convert a working copy with the following
problems:

1. It is unix only.
2. It won't work if there are any spaces in paths.
3. It will make your working copy dog slow (full comparisons for
property changes due to differing timestamps).

Anyway here is the script:
~~~~~~~~~~~~~~~<cut here>~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh
SVN_DIRS=`find . -type d -name .svn -print`
for d in $SVN_DIRS; do
  echo "Processing $d"
  PROP_FILES=`find $d/props -type f -print`
  for f in $PROP_FILES; do
    #echo "File is $f"
    mv $f $f.svn-prop
  done
done
~~~~~~~~~~~~~~~<end cut>~~~~~~~~~~~~~~~~~~~~~~~~~~

And here is the patch:

Fix issue #618.

* subversion/libsvn_wc/wc.h(SVN_WC__PROP_EXT): New define.

* subversion/libsvn_wc/adm_files.c (prop_path_internal): Pass
  SVN_WC__PROP_EXT for the extension to property files.
  (svn_wc__open_props): Same.
  (svn_wc__close_props): Same.
  (svn_wc__sync_props): Same.

Index: subversion/libsvn_wc/adm_files.c
===================================================================
--- subversion/libsvn_wc/adm_files.c
+++ subversion/libsvn_wc/adm_files.c Wed Jul 31 20:49:01 2002
@@ -377,7 +377,7 @@
 
       *prop_path = extend_with_adm_name
         (*prop_path,
- base ? SVN_WC__BASE_EXT : NULL,
+ base ? SVN_WC__BASE_EXT : SVN_WC__PROP_EXT,
          tmp,
          pool,
          base ? SVN_WC__ADM_PROP_BASE : SVN_WC__ADM_PROPS,
@@ -780,9 +780,11 @@
         return open_adm_file (handle, parent_dir, NULL, flags, pool,
                               SVN_WC__ADM_DIR_PROPS, NULL);
       else
- return open_adm_file (handle, parent_dir, NULL, flags,
- pool, SVN_WC__ADM_PROPS, base_name,
- NULL);
+ {
+ return open_adm_file (handle, parent_dir, SVN_WC__PROP_EXT, flags,
+ pool, SVN_WC__ADM_PROPS, base_name,
+ NULL);
+ }
     }
 }
 
@@ -840,8 +842,8 @@
         return close_adm_file (fp, parent_dir, NULL, sync, pool,
                                SVN_WC__ADM_DIR_PROPS, NULL);
       else
- return close_adm_file (fp, parent_dir, NULL, sync, pool,
- SVN_WC__ADM_PROPS, base_name, NULL);
+ return close_adm_file (fp, parent_dir, SVN_WC__PROP_EXT, sync, pool,
+ SVN_WC__ADM_PROPS, base_name, NULL);
     }
 
 }
@@ -898,7 +900,7 @@
         return sync_adm_file (parent_dir, NULL, pool,
                               SVN_WC__ADM_DIR_PROPS, NULL);
       else
- return sync_adm_file (parent_dir, NULL, pool,
+ return sync_adm_file (parent_dir, SVN_WC__PROP_EXT, pool,
                               SVN_WC__ADM_PROPS, base_name, NULL);
     }
 
Index: subversion/libsvn_wc/wc.h
===================================================================
--- subversion/libsvn_wc/wc.h
+++ subversion/libsvn_wc/wc.h Wed Jul 31 20:48:57 2002
@@ -39,6 +39,7 @@
 #define SVN_WC__TEXT_REJ_EXT ".rej"
 #define SVN_WC__PROP_REJ_EXT ".prej"
 #define SVN_WC__BASE_EXT ".svn-base"
+#define SVN_WC__PROP_EXT ".svn-prop"
 
 
 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • application/pgp-signature attachment: stored
Received on Thu Aug 1 07:14:56 2002

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.