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

Re: Able to mkdir .svn ?

From: <cmpilato_at_collab.net>
Date: 2003-03-26 20:04:55 CET

"Francois Beausoleil" <fbeausoleil@ftml.net> writes:

> Hi !
>
> I was trying to think of special ways in which I could break SVN. I will
> write a test for that later, but here's a recipe that works:
>
> C:\>svnadmin create repos
>
> C:\>svn mkdir file:///repos/.svn -m "should not commit"
>
> Committed revision 1.

Try this, and if it works, someone should probably commit it up. (I'm
not in a good testing state right now).

Index: subversion/libsvn_client/add.c
===================================================================
--- subversion/libsvn_client/add.c (revision 5448)
+++ subversion/libsvn_client/add.c (working copy)
@@ -189,6 +189,14 @@
 
       *commit_info = NULL;
 
+ /* Split the new directory name from its parent URL. */
+ svn_path_split (path, &anchor, &target, pool);
+ target = svn_path_uri_decode (target, pool);
+ if (strcmp (target, SVN_WC_ADM_DIR_NAME) == 0)
+ return svn_error_createf
+ (SVN_ERR_RA_ILLEGAL_URL, NULL,
+ "The directory `%s' is reserved for administrative use.", target);
+
       /* Create a new commit item and add it to the array. */
       if (ctx->log_msg_func)
         {

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 26 20:08:23 2003

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.