On Mon, May 11, 2009 at 08:13, Irfan Sayed <irfu.sayed_at_gmail.com> wrote:
> Hi All,
>
> I am writting pre commit trigger which will restrict users from adding
> file/dir names if they contain any white spaces.
> i red the pre-commit.tmpl file and it gives two arguments to pass to the
> script
> i have written one simple perl script which will take two arguments passed
> by pre-commit and ;check whether the path which is getting added in svn has
> space or not if it is then it will exit with sttaus 1
>
> two argumenst are REPOS and TXN . my assumption is that TXN is nothing but
> the path which is getting added
> REPOS is nothing but name of the repositotry
> is this correct??
>
> but with this assumption the script is not working
Both assumptions are wrong. TXN-NAME is ID of the transaction being
committed (attempted, actually). REPOS is the local filesystem path to
the repository. This is explained pretty clearly in the template:
# [1] REPOS-PATH (the path to this repository)
# [2] TXN-NAME (the name of the txn about to be committed)
You then use these arguments with the svnlook program to inspect
what's about to be committed.
The templates are pretty well-documented as far as what information is
passed into each hook by Subversion.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2189842
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-11 14:48:57 CEST