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

Re: svnlook not looking too well

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-10-26 23:57:37 CEST

MCaron@primetherapeutics.com wrote:
>
> Blair Zajac <blair@orcaware.com> wrote on 10/26/2007 04:32:20 PM:
>
> > MCaron@primetherapeutics.com wrote:
> > >
> > > Hello,
> > >
> > > I'm having problems with svnlook. I'm using it in a pre-commit hook.
> > > As a side-note, I had issues before because the template
> > > (pre-commit.tmpl) had the $REPOS and $TXN parameters REVERSED in the
> > > svnlook command! Now I've got them in the right order, but I am
> getting
> > > this message:
> > >
> > > svnlook log -t /home/svn/repos/repos2 93-1
> > > svnlook: Can't open file '93-1/format': No such file or directory
> >
> > The command line arguments are in the wrong order:
> >
> > $ svnlook log -t 93-1 /home/svn/repos/repos2
> >
> > Regards,
> > Blair
> >
> > --
> > Blair Zajac, Ph.D.
> > http://www.orcaware.com/svn/
>
>
> I don't think the parameters are in the wrong order. The template does
> have it wrong
> ($TXN $REPOS) - it should be $REPOS $TXN. Here is the output from
> svnlook help:

The default pre-commit script created by 'svnadmin create' does have it in the
correct order, it's REPOS followed by TXN.

REPOS="$1"
TXN="$2"

The order of options doesn't matter, but the transaction must follow the -t. So
these two are both correct and equivalent:

$ svnlook log -t 93-1 /home/svn/repos/repos2 93-1
$ svnlook log /home/svn/repos/repos2 -t 93-1

And this is how you want to run it

# Make sure that the log message contains some text.
SVNLOOK=/usr/local/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null || {
   echo "$0: no log message for txn $TXN" 1>&2
   exit 1
}

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 26 23:58:08 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.