Kevin Pilch-Bisson <kevin@pilch-bisson.net> writes:
> Here is a patch which solves issue #618. The reason it's not applied
> is that it will break any existing working copies.
I've been thinking about this a bit.
There are a *lot* of working copies out there now. Yes, I know,
Subversion is Alpha software and all that, and people should be
prepared for incompatible changes... But still. It would be nice to
avoid another recheckout.
Can you can put some temporary compatibility code in, such that
Subversion first looks for the prop file under the new name, then if
that fails tries the old name (i.e., without the extension)? Of
course, when writing a prop file, it would always produce the new
name. It could even convert during otherwise read-only operations, if
that's easy -- whenever trying to detect a prop change, for example.
Maybe there's no change, but after the detection code runs, the prop
files have been magically switched to the new-style names :-).
After a month or so, working copies will all be fine, and we can just
remove the compatibility code, leaving only the new-style code.
Is this possible? It would be *so* nice to avoid Yet Another Working
Copy Reset for everyone, especially with an interim tarball coming up
(which would force the uncomfortable question of whether to make the
incompatible change right before or right after the tarball, sigh).
Thoughts?
-Karl
> 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
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 5 23:28:57 2002