You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Robert Sandie <sa...@gmail.com> on 2006/07/12 01:06:08 UTC

SVN Hook specifically for Trunk Question

Very basic.. I know, I know!

Am trying to hook the trunk instead of the entire source repository.

Currently in post-commit:
svn update /var/httpd/

How would I change it to just transfer over the /trunk/ directory and make
that the /var/httpd/ directory?

Mucho gracias!

- rob

---- 
robertsandie.com

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

RE: SVN Hook specifically for Trunk Question

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Robert Sandie <ma...@gmail.com>:
> 1. svn export file:///var/production_repo/trunk/ /var/httpd -
> production server command? 
> 2. svn update file:///var/production_repo/trunk/ /var/httpd
> - little less secure but okay for development?
> 
> Is #2 the right command for abstracting all the information
> to the apache directory?

No, not quite.

You must first manually use the 'svn checkout' command to create the
working copy.  This is where you use the URL.  eg:

  svn checkout file:///var/production_repo/trunk/ /var/httpd

Once that is done, then you can use 'svn update' whenever you want to
update that working copy to the latest version (either manually or from
within a script):

  svn update /var/httpd

Note that the initial checkout will fail if you have files already in
/var/httpd (well, technically it'll only fail if you have clashing
files, ie. existing files with the same names as files in the
repository).

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

RE: SVN Hook specifically for Trunk Question

Posted by Robert Sandie <sa...@gmail.com>.
This is not an exposed site and is strictly used for production....

Sounds like I have two choices:

1. svn export file:///var/production_repo/trunk/ /var/httpd
- production server command?
2. svn update file:///var/production_repo/trunk/ /var/httpd
- little less secure but okay for development?

Is #2 the right command for abstracting all the information to the apache
directory?

Also, all the code is PHP5 stuff with Smarty templates and what not. The
paths are correct and even configurable wherever they are put.

- rob

> -----Original Message-----
> From: Gavin Lambert [mailto:gavinl@compacsort.com]
> Sent: Tuesday, July 11, 2006 9:19 PM
> To: 'Robert Sandie'
> Cc: users@subversion.tigris.org
> Subject: RE: SVN Hook specifically for Trunk Question
> 
> Quoth Robert Sandie <ma...@gmail.com>:
> > Very basic.. I know, I know!
> >
> > Am trying to hook the trunk instead of the entire source repository.
> >
> > Currently in post-commit:
> > svn update /var/httpd/
> >
> > How would I change it to just transfer over the /trunk/
> > directory and make that the /var/httpd/ directory?
> 
> You just need to make sure that whatever you had checked out to the
> /var/httpd folder in the first place was the correct path.
> 
> Don't forget to make sure your server won't serve anything from the .svn
> folders, though, otherwise you'll have a security hole.  If you want to
> be safe, then you should export to the folder rather than checking out
> (but then you won't be able to update later, so your post-commits will
> take longer).  You could svn export to a third folder and then sync that
> to /var/httpd....

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

RE: SVN Hook specifically for Trunk Question

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Robert Sandie <ma...@gmail.com>:
> Very basic.. I know, I know!
> 
> Am trying to hook the trunk instead of the entire source repository.
> 
> Currently in post-commit:
> svn update /var/httpd/
> 
> How would I change it to just transfer over the /trunk/
> directory and make that the /var/httpd/ directory?

You just need to make sure that whatever you had checked out to the
/var/httpd folder in the first place was the correct path.

Don't forget to make sure your server won't serve anything from the .svn
folders, though, otherwise you'll have a security hole.  If you want to
be safe, then you should export to the folder rather than checking out
(but then you won't be able to update later, so your post-commits will
take longer).  You could svn export to a third folder and then sync that
to /var/httpd....

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