Thursday, December 23, 2010

Subversion: How to Commit a Directory Without Committing its Contents

I updated the svn:externals property of my project root directory to pull-in updated code from another project. But, I had local changes that I didn't want to commit. The vanilla svn commit . tried to commit all my changes, not just the property ones. The answer was simple: addition of the --non-recursive (-N) option. This option, however, is deprecated.

It appears that the --depth option is the replacement. The sparse directories section of the SVM manual provides details about possible --depth arguments (which are lacking from the options manual page). Note that the --depth option would also be useful for trimming large sections of a checkout that are rarely/never used.

Saturday, December 11, 2010

Faster Brother Printing

The biggest annoyance I've had with my Brother HL-2170W laser printer is the speed at which data is sent and processed. Printing a one-page Google Maps directions would take minutes. Now, it takes about 15 seconds. What made the difference? Drivers, of course.

When I installed the printer, I selected an appropriate driver from the foomatic database when setting-up CUPS. What I didn't do was to check to see whether there were special Brother drivers which weren't installed by default. It turns out that there are quite a number of special Brother drivers which aren't installed by default. This thread directed me to open up synaptic and search for Brother. Sure enough, there were at least two laser driver packages which I didn't have installed:

  • brother-lpr-drivers-laser
  • brother-lpr-drivers-laser1
After I installed them and the dependencies, I opened the Administration/Printing GUI and selected the "Change..." button for "Make and Model" of my Brother printer (select "Properties"). My printer was using the "Foomatic/pxlmono" driver. I changed this to the "Foomatic/ljet4" driver. Immediately, I found printing to be substantially faster. I retried printing a map that had taken minutes earlier in the day. It came out immediately after the printer had warmed up, no more endless "sending" status messages.

P.S. Note that if you don't have a laser Brother printer, you'll need to search through the driver package names to find one that matches your printer. Look for packages that start with "brother-lpr-drivers". The last word in the name gives you a hint of the type of printer it provides support for. In synaptic, you can click on a package name to see the description.