here is the command i am using...
svnlook changed -t $2 $repo
where $2 is the transaction no as given by pre-commit hook and $repo
contains the name of the repository.
isuue is that command is executing but all the print statement which i
mentioned in perl script i am not able to see
i am using tortise SVN client
Please advise
Regards
irf
On Tue, May 12, 2009 at 5:15 PM, Bert Huijben <bert_at_qqmail.nl> wrote:
> In this case you can use -t <transaction> instead of -r <revision>. The
> transaction name is passed to the pre commit hook.
>
>
>
> The revision number is only available after the commit.
>
>
>
> Bert
>
>
>
> *From:* Irfan Sayed [mailto:irfu.sayed_at_gmail.com]
> *Sent:* dinsdag 12 mei 2009 13:36
> *To:* David Weintraub
> *Cc:* users_at_subversion.tigris.org
> *Subject:* Re: pre commit trigger
>
>
>
> Hi All,
>
>
>
> i am using following command to check whether file is added or modified.
>
> *svnlook changed -r <revesion_no> <path_to_repo>*
>
> this command will give the changes related to revesion which is already
> commited
>
> but my doubt is that how should i get the revesion no which is being
> commited so that i can pass that no. to this command.
>
>
>
> i believe that svnlook changed command only give me the file path name
> which is being added
>
>
>
> please advise
>
>
>
> Regards
>
> irf
>
> On Mon, May 11, 2009 at 8:55 PM, David Weintraub <qazwart_at_gmail.com>
> wrote:
>
> The Transaction number is a way of identifying the list of files that
> are affected by the transaction. Think of it as a parallel to the
> revision number. If I specify a particular revision:
>
> $ svnlook log -r1234 repository/path
>
> This will list all the files that were commited in revision #1234 of
> Subversion. Similar to this command:
>
> $ svn log -r1234 file://repository/path
>
> If I specify the transaction number, it will give me the log of the
> POSSIBLE revision that I am about to commit:
>
> TXN=$2
> svnlook -t $TXN repository/path
>
> Now, I'll get the list of files that are in the subversion commit
> transaction I'm parsing.
>
> By the way, I already have a Perl trigger that does this very thing.
> It actually is a bit more flexible in that you can ban any file names
> you want. For example, on Windows machines, you can't have a file
> named con.* or prn.* or any combination where con or prn are followed
> by a number. In mixed Unix/Windows, you want to make sure your Unix
> people aren't creating a file called con2.java which the Windows
> people can't check out.
>
> The trigger also handles commit access on files, and protects your
> tags directory by allowing people to add tags, but not to change the
> files under the tags directory. As an added bonus, it also checks
> files to see if required attributes have been placed upon them.
>
> You can get the trigger from <http://dl.getdropbox.com/u/433257/hooks.zip
> >.
>
>
> On Mon, May 11, 2009 at 8:13 AM, 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
> >
> > pease advice
> >
> > Regards
> > Irf.
> >
>
>
> --
> David Weintraub
> qazwart_at_gmail.com
>
>
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2213958
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-12 16:04:36 CEST