On Wed, Oct 5, 2011 at 11:54 AM, Jay Levitt <jay.levitt@gmail.com> wrote:

Meanwhile, TextMate somehow deleted all BUT the info.plist and tmDelta
files.  Is that normal, too? I pushed that version, but he gets the
same corruption error there.  We're both on 1.5.10 (1631), OSX 10.6.8.

There are two locations bundles can be.  They are:

1. ~/Library/Application Support/TextMate/Bundles/
2. ~/Library/Application Support/TextMate/Pristine Copy/Bundles/
 
The first one is the location of bundles you've created from scratch through TextMate's bundle editor, and bundle deltas for any modifications you make to existing bundles.

The second one is the location of bundles that you've *installed* via TextMate (double clicking the bundle file, or "Open WIth...").  The "Pristine Copy" is the unmodified original.

When you change a bundle command, template, setting, etc., TextMate does not overwrite the original.  Instead, it creates a copy of the bundle in the first location, and creates tmDelta files.  The tmDelta commands/template/whatever simply overrides the pristine bundle's.  This is useful mainly for changing keyboard shortcuts or changing a command's scope, without breaking the original author's bundle.  If you goof up something bad, all you need to do is delete your tmDelta, and you're back to the original.

With that said, what you should be doing is putting sql.tmbundle in the first location.  Don't install it via TextMate, copy the bundle there yourself.  When you edit bundle items in the first location, it will actually overwrite it instead of creating tmDelta files.

And to save yourself some headaches: bundle item changes aren't written to the disk until you close the bundle editor (at least in my experience).

-Tommy