You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Hyrum K. Wright" <hy...@mail.utexas.edu> on 2009/02/05 19:56:10 UTC

Re: svn commit: r35701 - trunk/subversion/libsvn_wc

Hyrum K. Wright wrote:
> Author: hwright
> Date: Thu Feb  5 11:41:42 2009
> New Revision: 35701
> 
> Log:
> Don't create the format file in the the WC administrative area.  This file
> as been deprecated since 1.4, and only existed as a nicety for ancient working
> copies.
> 
> * subversion/libsvn_wc/adm_files.c
>   (init_adm): Don't create the format file.
> 
> * subversion/libsvn_wc/README:
>   Update documentation regarding the format file.
> 
> * subversion/libsvn_wc/log.c
>   (log_do_upgrade_format): In place of rewriting the format file, just remove
>     it.
> 
> Modified:
>    trunk/subversion/libsvn_wc/README
>    trunk/subversion/libsvn_wc/adm_files.c
>    trunk/subversion/libsvn_wc/log.c
> 
> Modified: trunk/subversion/libsvn_wc/README
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/README?pathrev=35701&r1=35700&r2=35701
> ==============================================================================
> --- trunk/subversion/libsvn_wc/README	Thu Feb  5 11:25:42 2009	(r35700)
> +++ trunk/subversion/libsvn_wc/README	Thu Feb  5 11:41:42 2009	(r35701)
> @@ -77,7 +77,7 @@ Structure of the Working Copy
>  Working copy meta-information is stored in .svn/ subdirectories,
>  analogous to CVS/ subdirs.  See the separate sections below for more details.
>  
> -  .svn/format                   /* Deprecated in post 1.3 working copies. */
> +  .svn/format                   /* Not present in post 1.3 working copies. */
>         entries                  /* Various adm info for each directory entry */
>         dir-props                /* Working properties for this directory */
>         dir-prop-base            /* Pristine properties for this directory */
> @@ -112,8 +112,7 @@ analogous to CVS/ subdirs.  See the sepa
>     Says what version of the working copy adm format this is (so future
>     clients can be backwards compatible easily).
>  
> -   This file is deprecated and present for backwards compatibility.
> -   It may be removed in the future.
> +   This file is not created in 1.6 or later working copies.
>  
>  `entries':
>     This file holds revision numbers and other information for this
> 
> Modified: trunk/subversion/libsvn_wc/adm_files.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/adm_files.c?pathrev=35701&r1=35700&r2=35701
> ==============================================================================
> --- trunk/subversion/libsvn_wc/adm_files.c	Thu Feb  5 11:25:42 2009	(r35700)
> +++ trunk/subversion/libsvn_wc/adm_files.c	Thu Feb  5 11:41:42 2009	(r35701)
> @@ -700,14 +700,6 @@ init_adm(const char *path,
>    SVN_ERR(svn_wc__entries_init(path, uuid, url, repos,
>                                 initial_rev, depth, pool));
>  
> -  /* We provide this for backwards compatibilty.  Clients that don't understand
> -     format version 7 or higher will display a nicer error message if this
> -     file exists.
> -     ### Consider removing this in svn 1.5 or 1.6. */
> -  SVN_ERR(svn_io_write_version_file(svn_wc__adm_child(path, SVN_WC__ADM_FORMAT,
> -                                                      pool),
> -                                    SVN_WC__VERSION, pool));
> -
>    /* Now unlock it.  It's now a valid working copy directory, that
>       just happens to be at revision 0. */
>    return svn_wc_adm_close2(adm_access, pool);
> 
> Modified: trunk/subversion/libsvn_wc/log.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/log.c?pathrev=35701&r1=35700&r2=35701
> ==============================================================================
> --- trunk/subversion/libsvn_wc/log.c	Thu Feb  5 11:25:42 2009	(r35700)
> +++ trunk/subversion/libsvn_wc/log.c	Thu Feb  5 11:41:42 2009	(r35701)
> @@ -1471,8 +1471,8 @@ log_do_upgrade_format(struct log_runner 
>      return svn_error_create(pick_error_code(loggy), NULL,
>                              _("Invalid 'format' attribute"));
>  
> -  /* Update the .svn/format file right away. */
> -  SVN_ERR(svn_io_write_version_file(path, fmt, loggy->pool));
> +  /* Remove the .svn/format file, if it exists. */
> +  SVN_ERR(svn_io_remove_file(path, loggy->pool));

One thing I wasn't sure about, and I couldn't find in the docs, was what happens 
if we try to remove a file which doesn't exist.  Theoretically, we should have 
any problems, because all existing formats have this file, and the only time 
this code gets run is when upgrading formats.  However, I still wonder...

>    /* The nice thing is that, just by setting this flag, the entries file will
>       be rewritten in the desired format. */
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1108811
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1108909