Re: Linux 2.4 and BitKeeper

Andreas Ferber (aferber@techfak.uni-bielefeld.de)
Sat, 16 Mar 2002 01:31:34 +0100


On Fri, Mar 15, 2002 at 11:30:01AM -0800, Larry McVoy wrote:
>
> If you use vim and ctags, it sucks because I haven't yet taught vim how
> to go from a read only revision controlled file to a read/write file.
> It would be way cool if some vim genius out there showed me how to do
> that, I know it is possible, vim has the hooks, I simply don't have the
> time to go figure it out.

I'm certainly not a "vim genius", but somehow I managed to write some
vim autocmds that do this ;-)

You can get the vim script from

http://www.myipv6.de/vim/extensions/bk.vim

Simply source it from your .vimrc. I tested it with vim 6.0 only,
although it should also work with prior versions.

On open, it tries to checkout a file from bitkeeper if it isn't
already checked out (doing "bk get" if you open it readonly and "bk
edit" otherwise), and it "bk edit"s the file if you start making
changes to a readonly bitkeeper controlled file.

Unfortunately, vim doesn't trigger the FileChangedRO autocmd if you do
a ":set readonly!" to go from readonly to read/write, so it doesn't
handle this case (AFAIK there is no way to intercept this command).

Andreas

-- 
       Andreas Ferber - dev/consulting GmbH - Bielefeld, FRG
     ---------------------------------------------------------
         +49 521 1365800 - af@devcon.net - www.devcon.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/