Subversion: retroactively modifying a commited comment

While no secret, it did take some effort to dig up the solution. One drawback of using Subversion is the smaller amount of information and anecdotes available, compared to older products like CVS.

I accidentally committed my changes without a log message. Silly me, click, click, oops.

After due diligence in Google, the Subversion Red-Bean docs taught me that there is a class of properties, like svn:log, that are special.

Some time with svn help propedit showed me that the form I wanted was svn propedit svn:log --revprop -r# PATH.

The error message from that, asking to “define a pre-revprop-change hook”, led me back to Google, and to eventually find that every Subversion repository has a hooks directory that initially carries skeleton versions of the hooks. Copying pre-revprop-change.tmpl to pre-revprop-change (Linux box) and chmod u+x was the last stretch to filling in that gaping hole that I had left in the logs.

All in all pretty painless. If I had been trying to modify another special revision property (e.g. svn:author), I would have had to modify the hook to exit 0 (i.e. exit without error) for properties other than just svn:log.

The last struggle was deciding whether this blog entry qualified as “tinkering” or “development”. Let’s call it “development”, since I think some developers would want to know how to correct that embarassing comment broadcast to the commit mailing list.

Tech life petering out?

I haven’t posted much in this blog recently, which is focused on what I do and learn in computer technology. I can attribute that to three reasons:

  • My day job involves almost no coding. I read a lot about software and technology, but it’s difficult to post about results from those endeavours. The material is all public, and what I end up writing from that research is technically confidential.
  • My night job, while is coding, is not particularly difficult or novel coding, though it is providing a new solution to a very real problem. The coding’s hard only because of the short amount of time I can spend on it.
  • Natural variation in lifestyle. As much as I enjoy computers, I am loathe to say “no” to friends calling on me, either in need or for company. That’s a choice, and one I’m happy to take.

My day job involves some human issues as it pertains to technology, however, so perhaps I’ll write about the frame of mind and intent I use when doing that. I’ll have to be careful not to slip and say something inappropriately specific, though

Follow

Get every new post delivered to your Inbox.