avian/mercurial.tmbundle — pull request #1 by schinckel (2012-05-04 12:19:34+00:00)
Title: Use TM_DIRECTORY where applicable

Most of the commands in this bundle have something that checks to see if `TM_PROJECT_DIRECTORY` exists, and if it does, that is used as the working directory when running the command.

This means that it is not possible to commit/inspect/whatever a subrepo, as it always jumps back to the TextMate project root.

Changing the directory to the project root before running an hg command is unnecessary: hg will find the root of the repository, and work as expected.

Changing all of the instances of export/cd to `$TM_DIRECTORY` (removing the if clause, or changing the "${...}" stuff) means that the commands will then work with the main repo, and any subrepos.