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

Re: cannot get post-commit.tmpl to work

From: Zouari Fourat <fourat_at_gmail.com>
Date: 2005-10-28 20:44:42 CEST

ohh thanks a lot i didnt see it
am using this to do Revision number insertion in source code when committing :
so here's my post-commit file :

---------------------------begin
#!/bin/sh
REPOS="$1"
REV="$2"
#echo errr>>/tmp/log.test
/var/subversion/search-replace.sh .SVNREV. $REV "$REPOS/version"
---------------------------end

here's my bash script search-replace.sh (it search for a string in a
file and replace it by a given value)

---------------------------begin
#!/bin/sh

ARGS=3
if [ $# -ne "$ARGS" ]
then
   echo "Usage: `basename $0` <search-word> <replace-word> <file>"
   exit $E_BADARGS
fi

mv $3 $3.old.svn
sed "s/$1/$2/g" $3.old.svn > $3
rm -f $3.old.svn
---------------------------end

it doesnt work, it seems as the system does not call that script
(search-replace.sh) , even if i insert an 'echo something' on top of
the script it doesnt echo anything.

it does not work even with this post-commit file :
---------------------------begin
#!/bin/sh
mv "$REPOS/version" "$REPOS/version.old.svn"
sed "s/.SVNREV./$REV/g" "$REPOS/version.old.svn">"$REPOS/version"
rm -f "$REPOS/version.old.svn"
---------------------------end

what's the matter with this ?
thank you for help

On 10/28/05, Frank Gruman <fgatwork@verizon.net> wrote:
> Zouari Fourat wrote:
> > Hello,
> > I've a problem using the post commit hook, here's my post-commit.tmpl file :
> >
> > #!/bin/sh
> > REPOS="$1"
> > REV="$2"
> > echo errr>>/tmp/log.test
> >
> > it's too simple but it's not working :(
> > i do the commit and check my /tmp/log.test file and get nothing :(
> > can u hlp me please
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: users-help@subversion.tigris.org
> >
> >
> >
> how about copying the post-commit.tmpl to post-commit??
>
> those files are there as a template (guide) to use if and when you want
> them. To actually use them, you have to copy and drop the .tmpl extension.
>
> regards,
> Frank
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 28 20:47:19 2005

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.