0

everyone. Due to lose manual document about python svn api. I can't solve this issues.

The detail is, when someone commit svn something to repository "/repo/prj1". But, I wang to change these content commit to other place, ie, "/repo/prj2". I found many examples about python svn script, and try to do this using hooks. But, I can't solve this issue.

Can anyone help me? Thanks first!

bahrep
  • 29,961
  • 12
  • 103
  • 150

1 Answers1

0

As far as understand the case you can't do this.

See SVNBook:

While hook scripts can do almost anything, there is one dimension in which hook script authors should show restraint: do not modify a commit transaction using hook scripts. While it might be tempting to use hook scripts to automatically correct errors, shortcomings, or policy violations present in the files being committed, doing so can cause problems. Subversion keeps client-side caches of certain bits of repository data, and if you change a commit transaction in this way, those caches become indetectably stale. This inconsistency can lead to surprising and unexpected behavior. Instead of modifying the transaction, you should simply validate the transaction in the pre-commit hook and reject the commit if it does not meet the desired requirements. As a bonus, your users will learn the value of careful, compliance-minded work habits.

bahrep
  • 29,961
  • 12
  • 103
  • 150