You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "King, Rogie" <Ro...@carroll.edu> on 2005/12/12 21:34:22 UTC

svn update ONLY on revision directory

I currently have a post-commit script working wonderfully, except that
it is a little slow.  I noticed that if I run svn update on the base of
my repo, then it takes much longer than running svn update ONLY in the
directory where there were changes.  My goal is to make the post-commit
hook run svn update only in the directory that was changed.  Currently,
my script looks like this:

 

REPOS="$1"

REV="$2"

 

/usr/local/bin/svn update /usr/home/httpd/domains/www.carroll.edu/site

 

The REPOS variable holds this:

 

trunk/prod-site/public_html/athletics/womensbb

 

I'd like the script to change to something like:

 

/usr/local/bin/svn update /usr/home/httpd/domains/www.carroll.edu/site/
public_html/athletics/womensbb

 

Any ideas/help?  Has this been done before?

 

 

 


Re: svn update ONLY on revision directory

Posted by Daniel Montero <da...@soin.co.cr>.
I had the same problems.
I am doing what you want, and only for files under trunk/
you could try something like that:

CHANGED=$(  /usr/bin/svnlook dirs-changed -r "$REV" "$REPOS" | grep 
'trunk/' | cut -c7- )
wcdir=/path/to/my/working/copy
for file in $CHANGED
do
        echo == svn update ${wcdir}/${file}...
        /usr/bin/svn update --username repos_user --password 
repos_password ${wcdir}/${file}
done

King, Rogie wrote:

> I currently have a post-commit script working wonderfully, except that 
> it is a little slow.  I noticed that if I run svn update on the base 
> of my repo, then it takes much longer than running svn update ONLY in 
> the directory where there were changes.  My goal is to make the 
> post-commit hook run svn update only in the directory that was 
> changed.  Currently, my script looks like this:
>
>  
>
> REPOS="$1"
>
> REV="$2"
>
>  
>
> /usr/local/bin/svn update /usr/home/httpd/domains/www.carroll.edu/site
>
>  
>
> The REPOS variable holds this:
>
>  
>
> trunk/prod-site/public_html/athletics/womensbb
>
>  
>
> I'd like the script to change to something like:
>
>  
>
> /usr/local/bin/svn update 
> /usr/home/httpd/domains/www.carroll.edu/site/ 
> public_html/athletics/womensbb
>
>  
>
> Any ideas/help?  Has this been done before?
>
>  
>
>  
>
>  
>