Wikia

Vim Tips Wiki

Have VCSCommand work with an existing TortoiseSVN checkout

Talk0
1,599pages on
this wiki
Revision as of 08:20, July 14, 2012 by JohnBot (Talk | contribs)

Recently created tip

We have not yet decided whether to keep this tip as its own page or merge it somewhere else. If you have a suggestion on the tip content, please edit this page or add your comments below (do not use the discussion page).

Please discuss whether to keep this as a new tip, or whether to merge it into an existing tip, on the new tips discussion page.
created November 6, 2011 · complexity basic · version 7.0

Scenario: you have an existing svn working directory created with TortoiseSVN using the svn+ssh protocol, and you want to interact with it using version control commands within Vim.

In this case, the repository server is on a non-standard SSH port; to support this, a PuTTY named session is stored in the working directory meta-info. The following procedure will address this situation as well as a normally-addressed svn+ssh checkout.

Procedure

  1. Install the VCSCommand plugin as described on the script page. i.e. unpack the scripts to your plugin directory (probably C:\Program Files\vim\vimfiles\plugin). If you're only going to be using svn, you only really need vcscommand.vim and vcssvn.vim.
  2. edit the subversion config file.

    Under Windows 7, this is probably c:\users\admin\AppData\Roaming\Subversion\config.

    Surprisingly, TortoiseSVN doesn't do this by itself even though it's commonly described as required in order to have TSVN work over SSH. Edit the file and under the [tunnels] section, add this line:
    ssh = $SVN_SSH "C:/Program Files/tortoisesvn/bin/tortoiseplink.exe"

    Enter it that way verbatim (assuming you've installed TSVN in the standard location). The biggest hassle with all this is getting these command lines just so - it's incredibly sensitive to correct escaping etc.

  3. edit your _vimrc

    Add the following two lines. In my case, my working dir was in c:\working. Adjust the value of the second variable according to whatever yours is.

let VCSCommandSVNExec="C:\\Progra~1\\TortoiseSVN\\bin\\svn.exe"
let VCSCommandVCSTypeOverride= [['C:\\working\\*', 'SVN']]

Again, do the escaping just like that (particularly the 'progra~1' thing), or VCSCommand will refuse to work without offering any particularly helpful error messages.

Then save and close everything. To test, edit one of the files in your checkout. Try :CVSLog and tortoiseplink should open a dialog prompting you for your repo password (assuming you authenticate via password). CVSCommand should then work as described in it's docco thereafter.

Comments

Advertisement | Your ad here

Photos

Add a Photo
103photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki