Moving (renaming) Files in CVS

Once of the main complaints about the CVS version control system is that it’s difficult to move or rename files as your project structure changes.

While you can easily remove files and re-add them under a new name or location, this method loses the precious nuggets of wisdom contained in the file’s history — you do enter meaningful commit messages, don’t you? ;-)

Although recent CVS versions (CVSNT 2.0.55 and later) include support for a new rename command, the feature is classified as “experimental” and it’s not well-supported by common clients nor well-documented in the manual.

However, it can be done — the key is to understand that rename operations are properties of directories, not of the files inside. So when you move or rename a file, it is essential to commit the folder containing the file — and (if you moved the file) the new folder as well.

Before using the rename command, you may want to back up your local working copy (sandbox) just to be on the safe side if anything goes wrong — and if it does, please don’t blame me!

The steps below outline the basic process.

To move (rename) an existing file in CVS:

  1. If you’ll be moving a file to a new location that is not already under version control, create NewFolderName and add it to CVS with cvs add.

  2. At the command line, navigate to current location of the file you want to move (let’s call this OldFolderName) and enter:

    cvs rename OldFileName ../NewFolderName/NewFileName

    (the file is moved to NewFolderName and renamed to NewFileName)

  3. This is the important part! — Still in OldFolderName, enter:

    cvs commit

  4. If you moved the file to a different folder, cd to NewFolderName and repeat the commit command:

    cvs commit

    At this point, the repository knows about the changes to OldFolderName and NewFolderName.

    Now, for good measure, we will update our local sandbox to be sure we have a pristine copy of the project. In fact, to really make sure the repository “gets it”, we’ll remove NewFolderName and verify that it returns on update.

  5. So take a deep breath, and delete NewFolderName.

  6. Then, finally, navigate to your project’s root folder and enter:

    cvs update -P -d

    (In this command, the -P option tells CVS to “prune” (remove) any empty folders in your working copy, and -d creates any missing folders like NewFolderName.)

That’s it. You’re done!NewFolderName should reappear, and inside it, NewFileName will be waiting for you with its history intact!

What? It isn’t? — well, you do have that backup, don’t you?

iChm Adds Index Search

Keeping up the franctic pace of nearly weekly releases, Robin Lu has once again updated iChm to include another user-requested feature. Version 1.3 now allows you to search the index — this great little app just keeps getting better!

iChm Adds Index Support

Shortly after the well-received release of iChm 1.1.1, Robin Lu has responded to popular demand and updated his CHM Reader for Mac OS X with support for indexes.

iChm index popupThe sidebar now includes a small popup menu (shown at left) which toggles the sidebar to display either the table of contents or the index.

Congratulations to Robin for listening to users and reacting so quickly!

With the new index feature, Sparkle-based application updates and the tag-powered bookmarking system mentioned earlier, iChm is certainly the best CHM viewer available for Mac.

iChm - Cocoa CHM Reader for Mac OS X

iChm iconRobin Lu has released iChm, a Cocoa-based CHM Reader for Mac OS X with Webkit rendering, a slick tabbed interface and a bookmark system that not only allows you to store links to favorite topics in the current file, but also keeps track of your bookmarks across multiple files like in a regular Web browser.

When you bookmark a topic, you can assign tags which allow you to quickly access topics in any CHM file based on the keywords you have specified.

While the concept of tagging is hardly new, the feature is unique to CHM viewers on the Mac, and can be especially useful for help developers looking for a simple means of flagging open issues in topics—just add a FIXME tag to keep track of those pesky output bugs while you tweak your WebWorks stationery.

Unfortunately, iChm shares a shortcoming with many other Mac CHM viewers: the current version (1.1.1) offers no support for the index, which is an essential component of any well-built help system. With a little luck and a bit of persuasion, perhaps Robin can be convinced to add this feature in a later version.

It wouldn’t take much to make this the best CHM viewer available on the Mac—so many of the others were apparently released as one-hit wonders and have not been actively maintained in years.


2008-08-27 Update: Version 1.2 now includes index support.

2008-09-04 Update: Version 1.3 now allows you to search the index.

RenderX XEP Setup in oXygen

Recently, a client asked for assistance in setting up the RenderX XEP processor for use with the oXygen XML editor on Mac OS X. XEP is an XSL FO processor that can be integrated with oXygen to transform DITA maps to PDF via the PDF2 transformation scenario.

The steps below describe the basic setup, and while the output location is project-specific, the rest should be essentially the same in any environment.

  1. Install XEP (for example, to /Applications/RenderX-XEP)

  2. Point oXygen to XEP executable in oXygen prefs: XML > XSLT-FO-XQuery > FO Processors (Use the Browse button)

  3. Create/verify configuration of PDF2 transformation scenario in oXygen:

  • Open a DITA map file & select Configure Transformation Scenario from the DITA Maps menu.

  • Create new scenario, select PDF2 - Idiom FO Plugin as transformation type

  • In the Edit DITA Scenario dialog:

    • On the FO Processor tab, select XEP from the Processor list.
    • On the Parameters tab, set:
      • args.input to ${cf}
      • dita.dir to ${frameworksDir}/dita/DITA-OT
      • (other parameters optional)
    • Leave the default settings on the Filters tab.
    • On the Advanced tab, set:
      • Custom build file to ${frameworksDir}/dita/DITA-OT/build.xml
      • Java Home to Default, such as /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
    • On the Output tab, set:
      • Base directory to ${cfd}
      • Temp directory to a subfolder of output location, such as …/documentation/output/temp
      • Output folder to a subfolder of SVN documentation checkout location such as …documentation/output/pdf2
    • Click OK to save settings.
  • Click Transform now to create a PDF of the current DITA map.


Upgrading WordPress via Subversion

David over at Geeks are Sexy has a nice tutorial on keeping WordPress installations current by using Subversion to check out the latest code directly from the Automattic repository.

David’s instructions are much more detailed than the brief steps provided on the WordPress site, and also describe how to check out stable WordPress versions as opposed to the latest bleeding-edge code from trunk, and how to switch an established blog to Subversion to facilitate future updates.

(Essentially, you check out a working copy to your webserver via SSH and reconfigure the fresh install to use your existing database content—worked here quite nicely.)

Cornerstone: New Mac Subversion Client

cornerstone-app.pngZürich-based indy developer Zennaware has released Cornerstone, the latest attempt to make the Subversion experience more Mac-like. As Zennaware says,

We wanted to make an application which would make version control usable and, most-of-all, approachable to Mac users.

As John Gruber pointed out, they were brave enough to commercially release v1.0 without the requisite hype or beta Versions. And unlike many of the other Mac Subversion options, Cornerstone includes not only client functionality, but also the administrative tools, so you can perform various operations on the repository itself, not just your local working copy.

Oddly enough, many clients seem to only support a subset of even the client commands, so with many of the GUI frontends, you need to fall back to the command line to switch or relocate your working copy to a different repository, move files, etc.. Curious to see how complete Cornerstone is in this respect…

Now the question is, who will be first out of the blocks to support the new features in Subversion 1.5sparse checkouts, anyone?

Versions Emerge(s) From the Vapors

Nearly a year after the initial hype, Mac Subversion client Versions has finally seen the light of day with the release of a beta that at first glance offers little that other clients don’t.

The opening line of the beta announcement sheepishly concedes the app’s impending vaporware contender status:

Versions one year anniversary – celebrating with an actual app!

While the interface is certainly slick, it remains to be seen whether a Mac-like look and feel and a bit of Beanstalk integration are enough to win over those who’ve made do with the various alternatives thus far.

Despite the variety of cross-platform and Mac-specific Subversion clients available, with the exception of the somewhat orphaned SCPlugin, each oddly seems to assume developers need yet another app running alongside their work just to interact with a version control system, instead of just blending into the woodwork like the venerable TortoiseSVN.

Sometimes beauty in UI design is less about lickability than invisibility…

Clever Title Case Perl Script

John Gruber has released a clever Perl script that transforms selected text into title case (without simply capitalizing the first letter of each word as many so-called title case functions do).

The script uses a list of “small words” which are not capitalized based on guidelines from the New York Times Manual of Style.

It’s a Perl script, so save it as a text file and you can use it anywhere where Perl works. I use it as a system-wide service (with the shortcut Command-Shift-T) via Jesper’s excellent (and free) ThisService utility.

Thanks for a very useful addition to the writer’s toolbox!

FrameMaker 8.0.3 Patch Available

FrameMaker 8 iconMahesh Gupta has announced the release of a FrameMaker 8.0.3 patch, which addresses a long list of bugs and workflow issues, including the proper resolution of DITA content references.

The update is available via the Adobe Update Manager (Help > Updates), and should show up on the FrameMaker Downloads page sometime soon.