2

I am rewriting an older subversion precommit hook. In our company, we need to make sure that binary files are allowed on commit only if they have the property svn:needs-lock set before commit.

I started writing the hook and it looks like every part of the hook works, but I cannot find how to read, if the property is set.

I would assume, that SvnLookClient would have the SvnLookClient.GetProperty method, but the only one, that I see is SvnLookClient.GetRevisionProperty. Unfortunately GetRevisionProperty doesn't allow to pass the file in question. What am I missing here?

After all, svnlook propget does allow to pass a repository, a transaction, a propertyname AND the path in the repository.

Daniel Fabian
  • 3,828
  • 2
  • 19
  • 28

1 Answers1

1

See this SharpSvn users mailinglist thread.

The function was added to Subversion trunk tuesday and backported to 1.500x yesterday.

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73
  • Seems not to work for newly added files (throwing an exception `SharpSvn.SvnFileSystemException: File not found: transaction '3-o', path '/demo/wrong.cs'`). It seems that the current property in the repository is returned and not the property of the current transaction. Doing the same thing with the svnlookclient works. Maybe a bug? – Christian Rodemeyer Sep 21 '11 at 20:14