You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Alex Teslik <al...@acatysmoof.com> on 2006/04/13 06:49:15 UTC
youngest trunk revision?
Hello,
I would like to know the youngest revision of only the trunk of my
repository. I know "svnlook youngest RPATH" will tell me the latest revision
number, but it tells the latest for the entire repository - not just the trunk.
The reason I would like this number is because I would like a cron job that
monitors the respository and automatically creates a snapshot tarball, but
only when the repository has changed since the last tarball. I suppose I could
throw perl at it and extract the information from some other commands, but is
there a better way?
Thanks,
Alex
P.S.- post hooks are not a good solution since the commits may be too frequent
for the tarball to be made before the next commit.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: youngest trunk revision?
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 4/12/06, Alex Teslik <al...@acatysmoof.com> wrote:
> Hello,
>
> I would like to know the youngest revision of only the trunk of my
> repository. I know "svnlook youngest RPATH" will tell me the latest revision
> number, but it tells the latest for the entire repository - not just the trunk.
>
> The reason I would like this number is because I would like a cron job that
> monitors the respository and automatically creates a snapshot tarball, but
> only when the repository has changed since the last tarball. I suppose I could
> throw perl at it and extract the information from some other commands, but is
> there a better way?
svn log $URL_OF_TRUNK --limit 1 -q | awk '/^r/ { print $1 }
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: youngest trunk revision?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 13, 2006, at 08:49, Alex Teslik wrote:
> I would like to know the youngest revision of only the trunk of my
> repository. I know "svnlook youngest RPATH" will tell me the latest
> revision
> number, but it tells the latest for the entire repository - not
> just the trunk.
>
> The reason I would like this number is because I would like a
> cron job that
> monitors the respository and automatically creates a snapshot
> tarball, but
> only when the repository has changed since the last tarball. I
> suppose I could
> throw perl at it and extract the information from some other
> commands, but is
> there a better way?
> P.S.- post hooks are not a good solution since the commits may be
> too frequent
> for the tarball to be made before the next commit.
You could, however, use a very short hook script to see if the commit
is happening on trunk, and if so, record the revision number in a
file. Then the cronjob could read that file to determine the youngest
revision of trunk.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org