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

Re: How to get svn:mergeinfo in pre-commit hook?

From: Daniel Becroft <djcbecroft_at_gmail.com>
Date: Fri, 25 Sep 2009 12:43:07 +1000

On Sat, Sep 19, 2009 at 12:47 AM, Isenberg, Holger <isenberg_at_e-spirit.com>wrote:

> To block svn:mergeinfo on single files or directories except root on some
> branches, I'm trying to filter it in a pre-commit hook.
> While other properties like svn:log are accessible in the python based
> pre-commit script with the following lines, the property svn:mergeinfo is
> not, although it is set by the client and written if the pre-commit script
> is disabled.
>
> log = fs.svn_fs_txn_prop(txn_handle, 'svn:log')
> mergeinfo = fs.svn_fs_txn_prop(txn_handle, 'svn:mergeinfo')
> proplist = fs.svn_fs_txn_proplist(txn_handle)
>
> Is it possible to access svn:mergeinfo before committing?
> svn 1.6.4 is used on client and server.
>

Hi,

svn:mergeinfo is not a transaction or revision property, so I doubt it would
be available through the same function.

You'll need to use a function that can retrieve the contents of the commit
itself, rather than the properties of the transaction. I don't enough to
advise what that method would be, though.

Cheers,
Daniel B.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2400057

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-25 04:44:16 CEST

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.