[TxMt] Trapping file open

John Fieber jfieber at slis.indiana.edu
Fri Feb 10 21:09:54 UTC 2006

On Feb 10, 2006, at 12:16 PM, Trevor Harmon wrote:

> But I don't see how the Perforce vs. BitKeeper vs. whatever wars  
> are relevant. Can't the TextMate user choose whatever versioning  
> control system works best for him?

The wars are not relevant to the discussion.   Sadly, though, the  
TextMate user may have less influence over the version control system  
she/he must use than she/he would like.

In the course of a day I mostly work with files under version  
control.   During the course of a day I open many, many files in  
TextMate for viewing, with no intention of editing.   If every file I  
open for viewing gets checked out for edit (in the perforce sense),  
it is a hassle for me to revert those files later, and other users  
get warnings that I have those files open for edit when I don't  
actually intend to edit them.   The warnings which are actually  
somewhat useful, degenerate to noise if every file I merely open for  
reading is opened for edit in the eyes of the version control system.

I'm NOT saying that the ability to hook into a file opening event is  
at all a bad thing.   I am suspicious of hooking a version control  
operation into it though.  If a file opening hook were available, and  
a version control bundle hooked it, I would hope that the hook would  
be an opt-in setting and not on by default.

More generally, I would like TextMate to treat read-only files as  
exactly that: read only and un-editable until I explicitly say I want  
to override the read-only status either by simply flipping a write  
flag, or a more involved version control system operation.


(And BTW, does anyone in particular own the Perforce bundle?  I've  
been adding some odds and ends to my copy of it...)

More information about the textmate mailing list