Alexander, Thank you very much. I did find the SVNWCClient class while digging through the jar file but thought the XXXWCXXX classes were all for "Working Copy" use, so I didn't dig too deeply into them, but now know I should have.
Your suggestion does exactly what I need! Thank you, again! Cheers! Randy -----Original Message----- From: Alexander Kitaev [mailto:[email protected]] Sent: Wednesday, March 16, 2011 10:12 AM To: [email protected] Cc: Cobb, Randal Subject: Re: Updating a commit message in a post-commit hook Hello Cobb, To change commit message for a revision, you need to change revision property named "svn:log". With high level API what you need to call is SVNWCClient.doSetRevisionProperty(url, revision, SVNRevisionProperty.LOG, SVNPropertyValue.create(newMessage), true, null) where url is URL of repository. To get repository URL from File you may use SVNURL.fromFile(repositoryRoot) method. Also, you'll need to make sure that pre-revprop-change hook is enabled in repository, otherwise you will not be able to change revision properties. Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! http://sqljet.com/ - Java SQLite Library! On 14 March 2011 22:24, Cobb, Randal <[email protected]> wrote: > Hello all, > > > > I’m working on a project that updates a database record with commit > information from SVN. The post-commit hook in combination with the SVNKit’s > SVNLookClient gives me everything I need, and is working very well. > > > > I have been tasked with now updating the commit message in the same > post-commit hook. Management wants the record ID of the database record > inserted into the commit log message now. So, basically, the commit > information gets fetched via the SVNLookClient successfully, details parsed > out and stored in the database, now the generated record/row ID needs to be > added to the commit comment, but I can’t figure out how from most of the > documentation. Basically I need to change the log from what the developer > entered upon commit (i.e. “Fixed bug-X in file foo.java” to “Tracker id: > 0001 – Fixed bug-X in file foo.java”). > > > > I’ve read the JavaDocs, and can see how to make the change if I were doing a > low-level client, but I’m trying to avoid all of that unless really needed. > Is there a high-level API that I can leverage to do it (like at the same > level as the SVNLookClient) where I can pass in the repository, revision, > new message, etc.) without having to completely implement a low-level > client? After all, it IS in a post-commit hook already. > > > > If it helps/matters, Java version for the existing post-commit hook is Java > 6 on a Linux host (Suse), SVNKit API it’s currently using is the latest > 1.3.x release. > > > > Thanks in advance! > > Randy > > > > ________________________________ > This message and any attachments are intended only for the use of the > addressee and may contain information that is privileged and confidential. > If the reader of the message is not the intended recipient or an authorized > representative of the intended recipient, you are hereby notified that any > dissemination of this communication is strictly prohibited. If you have > received this communication in error, notify the sender immediately by > return email and delete the message and any attachments from your system. > ---------------------------------------------------------------------- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, notify the sender immediately by return email and delete the message and any attachments from your system.
