You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Zouari Fourat <fo...@gmail.com> on 2005/01/19 12:32:38 UTC

.svn folders

Hello
when uploading my files (php developement project) to the distant
server (apache one) my '.svn' folders are public visible.
how do you do (you old experienced with svn and cvs systems) facing
such problem ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Toby Johnson <to...@etjohnson.us>.
Peter Valdemar Mørch wrote:

> Or you can "svn co" + "find wc -name .svn -type d | xargs rm -rf" or 
> you can just disallow access to any .svn file in your apache config. 
> (Which is what I do)
>
>         <LocationMatch /.svn>
>                 Order allow,deny
>                 Deny from all
>         </LocationMatch>

Zouari, I would recommend this option. Another benefit of this is that 
if you have shell access to your web server, you could then update to 
the latest version using "svn update", which would be *much* faster than 
a new checkout or export each time.

In order to also prevent .svn directories from showing up in directory 
listings, find the "IndexIgnore" option in your Apache config and add 
".svn" to its list (or if you aren't Apache admin, create an .htaccess 
file with "IndexIgnore .svn" in it).


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: .svn folders

Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Thursday, January 20, 2005 2:01 AM -0800 Kenneth Porter 
<sh...@sewingwitch.com> wrote:

> This should work:
>
> <DirectoryMatch /\.svn$>

I asked about this in comp.infosystems.www.servers.unix and got this reply:

André Malo <au...@g-kein-spam.com> wrote in 
news:csofl9$olv$2@news.web.de:

> Hmm. I'd guess, you also want the directories inside the directories.
>
><DirectoryMatch /\.svn(/|$)>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: .svn folders

Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Thursday, January 20, 2005 9:40 AM +0100 Juanma Barranquero 
<le...@gmail.com> wrote:

> so perhaps:
> <LocationMatch "/\.svn">

Would DirectoryMatch be better? The docs indicate that it's preferred for 
matching objects in the filesystem, which is the case here. Adapting the 
example for it here:

<http://www.hk8.org/old_web/linux/apache/ch03_03.htm>

This should work:

<DirectoryMatch /\.svn$>

Alas, I haven't found any Apache documentation explaining precisely how a 
regex should be entered in a directive, ie. whether and when it needs 
quoting.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Juanma Barranquero <le...@gmail.com>.
> Shouldn't this be:
> 
> <LocationMatch "/\/\.svn/">
> 
> The value is a regex, and both slash and dot need to be escaped.

According to Apache docs:

> <LocationMatch "/(extra|special)/data">
> 
> would match URLs that contained the substring /extra/data or /special/data.

so perhaps:
<LocationMatch "/\.svn">

-- 
                    /L/e/k/t/u

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Wednesday, January 19, 2005 1:52 PM +0100 Peter Valdemar Mørch 
<no...@morch.com> wrote:

> <LocationMatch /.svn>

Shouldn't this be:

<LocationMatch "/\/\.svn/">

The value is a regex, and both slash and dot need to be escaped.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: .svn folders

Posted by Peter Valdemar Mørch <no...@morch.com>.
Zouari Fourat wrote:
> To reformulate my problem,
> when i need to upload a 'productif' version of my work, i do :
> svn co ...
> 
> and then upload those check out files, is there an option in svn to
> checkout a 'productif' version of my project (so without .svn folders)

Yes, this is called "svn export"....

Or you can "svn co" + "find wc -name .svn -type d | xargs rm -rf" or you 
can just disallow access to any .svn file in your apache config. (Which 
is what I do)

         <LocationMatch /.svn>
                 Order allow,deny
                 Deny from all
         </LocationMatch>

Check:
http://www.morch.com/writings/.svn

Peter

> 
> 
> On Wed, 19 Jan 2005 13:32:38 +0100, Zouari Fourat <fo...@gmail.com> wrote:
> 
>>Hello
>>when uploading my files (php developement project) to the distant
>>server (apache one) my '.svn' folders are public visible.
>>how do you do (you old experienced with svn and cvs systems) facing
>>such problem ?
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Johan Appelgren <jo...@gmail.com>.
On Wed, 19 Jan 2005 13:44:17 +0100, Zouari Fourat <fo...@gmail.com> wrote:
> To reformulate my problem,
> when i need to upload a 'productif' version of my work, i do :
> svn co ...
> 
> and then upload those check out files, is there an option in svn to
> checkout a 'productif' version of my project (so without .svn folders)
 
'svn export'

/Johan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Arnout Standaert <ar...@student.kuleuven.ac.be>.
Zouari Fourat wrote:

>To reformulate my problem,
>when i need to upload a 'productif' version of my work, i do :
>svn co ...
>
>and then upload those check out files, is there an option in svn to
>checkout a 'productif' version of my project (so without .svn folders)
>
"svn export" will probably do what you want.

Regards,
Arnout

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Jacob Atzen <ja...@aub.dk>.
On Wed, Jan 19, 2005 at 09:12:33AM -0500, Christopher Ness wrote:
> On Wed, 2005-19-01 at 14:48 +0100, Jacob Atzen wrote:
> > Or you could just:
> > 
> > svnlook youngest REPOS_PATH
> 
> True.
> 
> Iff your production server is the same machine as your Subversion server
> and the user you are running as has permissions to read the repository
> directory created with `svnadmin create`.
> 
> The solutions I suggest in this thread work from any machine with read
> access to the repository.

Ah yes. The difference between REPOS_PATH and REPOS_URL escaped me.
Thank you for the clarification.

-- 
Cheers,
- Jacob Atzen

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Christopher Ness <ch...@nesser.org>.
On Wed, 2005-19-01 at 14:48 +0100, Jacob Atzen wrote:
> Or you could just:
> 
> svnlook youngest REPOS_PATH

True.

Iff your production server is the same machine as your Subversion server
and the user you are running as has permissions to read the repository
directory created with `svnadmin create`.

The solutions I suggest in this thread work from any machine with read
access to the repository.

YMMV,
Ness
-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
09:05:14 up 20:29, 1 user, load average: 0.15, 0.08, 0.14 
http://www.fsf.org/philosophy/no-word-attachments.html

Re: .svn folders

Posted by Jacob Atzen <ja...@aub.dk>.
On Wed, Jan 19, 2005 at 08:33:54AM -0500, Christopher Ness wrote:
> [nesscg@heidrun ~]$ svn log -rHEAD https://websvn.your.domain | grep ^r
> r167 | nesscg | 2005-01-18 22:39:30 -0500 (Tue, 18 Jan 2005) | 4 lines
> 
> Now you can parse the output to get the first column and you have the
> revision number w/o needing a working copy.  Bah.
> 
> That should do it.  But remember, this is a dynamic command and will
> change every time you commit a revision.  So it should be run once upon
> export.

Or you could just:

svnlook youngest REPOS_PATH

-- 
Cheers,
- Jacob Atzen

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Christopher Ness <ch...@nesser.org>.
On Wed, 2005-19-01 at 14:02 +0100, Zouari Fourat wrote:
> thanks a lot !
> how can i export the 'youngest' revision number to a file when
> exporting my project so i can use that number to dynamically show the
> revision on my site

svnversion . <-- Only works on a working copy.  That's the kicker.

[nesscg@heidrun ~]$ svn log -rHEAD https://websvn.your.domain | grep ^r
r167 | nesscg | 2005-01-18 22:39:30 -0500 (Tue, 18 Jan 2005) | 4 lines

Now you can parse the output to get the first column and you have the
revision number w/o needing a working copy.  Bah.

That should do it.  But remember, this is a dynamic command and will
change every time you commit a revision.  So it should be run once upon
export.

Cheers,
Chris
-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
08:22:19 up 19:46, 2 users, load average: 0.10, 0.12, 0.09 
http://www.fsf.org/philosophy/no-word-attachments.html

RE: .svn folders

Posted by Dale Worley <dw...@pingtel.com>.
-----Original Message-----
From: Zouari Fourat [mailto:fourat@gmail.com]

how can i export the 'youngest' revision number to a file when
exporting my project so i can use that number to dynamically show the
revision on my site
---------------------------------------------------------------------

When you do "svn export http://...", the last line of its output will be
something like "Exported revision 360."

Dale


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Zouari Fourat <fo...@gmail.com>.
thanks a lot !
how can i export the 'youngest' revision number to a file when
exporting my project so i can use that number to dynamically show the
revision on my site


On Wed, 19 Jan 2005 13:48:54 +0100, Jonas Kvarnström <jo...@ida.liu.se> wrote:
> Zouari Fourat wrote:
> 
> > and then upload those check out files, is there an option in svn to
> > checkout a 'productif' version of my project (so without .svn folders)
> 
> Use svn export instead of svn checkout?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: .svn folders

Posted by Jonas Kvarnström <jo...@ida.liu.se>.
Zouari Fourat wrote:

> and then upload those check out files, is there an option in svn to
> checkout a 'productif' version of my project (so without .svn folders)

Use svn export instead of svn checkout?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: .svn folders

Posted by Zouari Fourat <fo...@gmail.com>.
To reformulate my problem,
when i need to upload a 'productif' version of my work, i do :
svn co ...

and then upload those check out files, is there an option in svn to
checkout a 'productif' version of my project (so without .svn folders)


On Wed, 19 Jan 2005 13:32:38 +0100, Zouari Fourat <fo...@gmail.com> wrote:
> Hello
> when uploading my files (php developement project) to the distant
> server (apache one) my '.svn' folders are public visible.
> how do you do (you old experienced with svn and cvs systems) facing
> such problem ?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org