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

Re: [PATCH] update webdav-proxy examples

From: Peter Samuelson <peter_at_p12n.org>
Date: Tue, 24 Jun 2008 12:52:51 -0500

[Axel Gembe]
> --- a/notes/webdav-proxy
> +++ b/notes/webdav-proxy
> @@ -62,7 +62,8 @@ SLAVE_HOST=slave.example.com
> SLAVE_PATH=/my/local/copy/of/repos
>
> # Ensure svnadmin is in your PATH on both this machine and the remote server!
> -svnadmin dump --incremental -r$2 $1 > /tmp/$2.dump
> +YOUNGEST=`ssh $SLAVE_HOST "svnlook youngest $SLAVE_PATH"`
> +svnadmin dump --incremental -r$[${YOUNGEST}+1]:$2 $1 > /tmp/$2.dump

$[ ] is not portable. I think the best you can do for portability,
short of `expr`, is $(( )). But the whole example is flawed by
overcomplexity (using temp files and extra ssh connections) as well as
not using -q on svnadmin {dump|load}. Compare:

  startrev=$((1 + $(ssh $SLAVE_HOST "svnlook youngest $SLAVE_PATH")))
  svnadmin dump -q --incremental -r$startrev:$2 $1 |
    ssh $SLAVE_HOST "svnadmin load -q $SLAVE_PATH"

-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-24 19:53:05 CEST

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.