jgreep's blog

Subversion Hooks

For my non-technical friends, Subversion is a tool for keeping track of changes to files and documents. It's free and it's very good. You can find it at http://svn.collab.net/. For my more technical friends, there's some interesting features that take some work to configure. I'm going to talk today about hooks.

Hooks

Hooks are little scripts or programs that run before or after you commit a change to the repository (where subversion keeps the files). They'll help you prevent bad changes from going in, or track changes in different ways. I recently installed a hook to send an email to people when a change is committed to the repository . You can, but don't need to, write your own hooks. There are some good ones already written.

The one that's driving me crazy is a hook called svnperms.py. It lets you configure more granular permissions on what you can and can't do. For instance, the convention in repositories is to have a trunk folder for your main files, a branches folder for working with files on the side, and a tags folder where you mark a set of files for future reference (like a bookmark). The rules say that you should only create tags and not update or delete them. svnperms helps make that happen.

svnperms.py

Installing the hook is sometimes trivial, but I had a few obstacles:

My first problem was that svnperms is written using the python language. That wasn't really the problem. T problem was that the system I was installing to doesn't have python. Not a big problem though - I had the system admin install it.

The installation of svn doesn't really have a standard location for hook scripts. You'll have to come up with your own. I copied mine into a separate folder and then just pointed my calls to them in the right direction. Once I had everything where I thought it would go, my first test couldn't find python. I was a bit stumped because I thought it was defined in the PATH environment. Apparently, it's not that simple. I needed some help, so I asked StackOverflow for help. I ended up setting the PATH explicitly in the script.

svnperms.conf
My biggest complaint about svnperms is that the documentation sucks. It's not really there. I'm not writing this as a replacement for the missing docs, but hopefully I can help someone else who is fighting with it.

There's a configuration file called svnperms.conf. It's there to define permissions. There are sections and groups that you define. Like the authz file, groups places users into groups. Sections define permissions for those groups.

You can have multiple groups and sections, but it appears that the section name needs to match the repository name - or something. I have a repository named Sandbox. I named a section [sandbox] and it complained that it couldn't find it. So I named it [Sandbox] to match the case of the repository and it seemed to work. There's nothing I can find documented that shows that behaviour.

There's a reference to a dead website (http://moin.conectiva.com.br/RepositorySystem) that is supposed to explain it all. The site isn't even available from the wayback machine.

My next trick will have to be to learn Python and trace the code by hand.

Shifting Seasons

This past Sunday, I was called to be the 2nd Councilor in the Valley View Ward bishopric. It was a surprise to me, since I expected the incumbent to be around for a while - it's only been a year since we reorganized the wards.

I was 2nd Councilor in the old 7th Ward when it was dissolved. So I have some experience with the calling. The year between has been good for me to experience a few things first hand. Plus, the ward has gotten to know me better, so I think they'll be more supportive. Not that they shouldn't be, but I think it makes the transition easier.

The call came through President Stanford, a councilor in the Stake Presidency. He requested an interview on Thursday. I wasn't sure what to expect, since I'd only been the Scout Leader for about 6 months. It was a relief to me to be able to still serve with the Young Men, particularly now that William is one of them.

They got me busy right away. It was our Ward Conference, so once I was sustained, my first assignment was to read the callings for sustaining. I didn't have to conduct, but I would have been fine with that. After the meetings, we have to process the tithing. It's comforting to be with the same people: Ken Redpath served as councilor with me under Bishop Leavitt, and Dan Drabick was the financial clerk then too.

The setting apart was planned for just after Sacrament meeting. By the time we gathered everyone together, it was getting too far into other meetings, so it was put off until after all of the meetings were over. That was good for me, since Joe and Dealia weren't coming until then, and I was hoping they could be there. Joe was able to stand in the circle.

Victoria remarked afterward that she figured I was called to the bishopric again to keep me from kissing her in Sacrament meeting all the time.

After everything ended, we gathered at my Mother's for dinner and spent the rest of the afternoon visiting. Glen and his family made it for dinner, but I didn't get the message to him in time for the setting apart.

The calling itself is considered by many as an honour, but I see it instead as a privilege to be able to serve. It seems a fitting change, seeing that Spring is nearly upon us.

Honey-Lime Vinaigrette

This vinaigrette was something that I made to satisfy a craving for a rich flavoured and sweet dressing that didn't rely on sugar or other junk. It's a relatively quick recipe and the Balsamic vinegar adds a deep flavour to it.

Ingredients
  • 3/4 cup Olive oil
  • 1/4 cup Balsamic Vinegar of Modena
  • 1 tsp minced shallot
  • 1 tbsp liquid honey
  • 1 tsp ground pepper
  • juice of 1/2 lime
  • 1 tbsp chopped fresh parsley
  • dash of salt
Combine ingredients and mix well.

What makes me want to go to work in the morning?

I've got a new manager at work, Monty Ghitter. I liked my old manager, Phil Brien, but the company wanted something different than what he offered. I'll miss Phil. I consider him a good friend.

So anyway, Monty asked me basically what turns my crank, or what makes me want to go to work in the morning? Along with that, what do I like and what don't I like.

The easy thing is what I don't like. I don't like Microsoft. As a developer, I feel left out. They offer the typical trial tools, but if you want to do any serious development on the Windows platform, the bread-and-butter developer is left with nothing but html and javascript.

I've worked on a VAX BASIC application called CBS for about 10 years. It's essentially a tool for the business to manage customer cable, internet, and phone accounts. It does work order management, provisioning of equipment, billing, and invoicing. I spent most of my time on the billing and invoicing. I wrote the part that does invoice notifications by e-mail, did a rebuild of the invoicing component to work with DOC1 (a tool that formats invoices), and wrote a customer messaging component that makes it easy to include inserts and messages with the invoice. The latter component is heavily relied on for rate adjustment notifications and was a big win for the company for productivity gains.

Of the CBS projects that excited me the most were the email and messaging components. I liked those because they made a difference. The messaging project came about as need to implement a previously failed rate adjustment in an emergency time frame. I had spent a long time doing incremental changes for bill inserts and was struggling to come up with a method to let the business make the changes themselves, without programming them. When this project came up, the method that I needed to use came clearly to me and solved both problems.

I also like refactoring, either for performance or for reusability. Coming up with a better way of doing something excites me.

I think I still like working with VAX BASIC, because it's become familiar to me. For my own career growth, I need to consider working with tools that are being used in current technologies. So for that reason, I need to dislike VAX BASIC.

There are tools that I like, but don't get to use often enough. I like Java, Javascript, PHP, CSS, XML, XSL, jQuery, and AJAX. I like hammers too.

So it comes down to what I'd like to do with those tools.

I like things that make me think. Once something gets to be thoughtless, it becomes mundane quickly and it's difficult to want to do it (unless I see the value in it - eating is thoughtless, but has lots of value!).

I like things that are cool. AJAX is cool. But it's also cool because it makes sense, like Unobtrusive Javascript makes sense because it promotes separating the display of information from the functionality behind it.
jQuery is cool because it has simple syntax and adds some cool functionality to web pages.

What I really like about these tools is that they're accessible so that I can learn and use them outside of work.

It doesn't make sense to get excited about tools unless you have something to make with them. What do I want to build then? I like making interfaces that people like to use. I'm happy to do the heavy lifting, but sometimes get frustrated with the finishing. I like some of the financial applications, as long as I have good requirements to work from. I like working with data too: figuring out the best way to represent something or to extract and massage the data into something that can be understood. I like to take something plain and dry and turn it into something fresh and vibrant. A simple tabular report is plain and dry. I like to show meaning with substance and let them visually feel the data. I like it when I make something that someone can look at in a different way and suddenly get it.

I like to take photographs. It's the same feeling as when someone looks at my pictures and says "Wow, that's beautiful!"

That's what gets me up in the morning.

More changes

I've had some fun with my assignments in the stake, but it was time for some changes. After some evaluation of the scouting program, they needed to make more adjustments. As a result, I'm now the Scout Leader for a combined Elliston Park / Valley View troop. I was sustained and set apart just on Sunday. I'm looking forward to working directly with the youth again. My oldest son will be joining the troop soon, so it will be an extra benefit to me.

Our goal is to help the boys achieve their Chief Scout award. They've got a good head start, but had lost their momentum. That's going to be my challenge. I've got at least one good assistant and hope to have a fun program going by September. Right away I need to get a calendar together.

In another part of my life, I've been training for a half marathon in Wainwright, Alberta on the way to a full marathon in Logan, Utah. I've had a tough time with the training, but I'm sure I can at least do the 1/2 this Saturday.

Syndicate content