Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to shell to get 'svn log %'. In order to get this into a different buffer, it seems the best way is to call:

:new | set buftype=nowrite | r !svn log #

Where r puts output from the shell command into the buffer created from new and # references the filename of the previous buffer. The problem I have is that my default shell is DOS and my svn is cygwin. I get

svn: E155010: The node '/e/code/branch\project\myproject\main.cpp' was not found.

So it seems the shell is passing the DOS path and svn is interpreting it to the base path /e/code/branch but then appends the rest of the path using \ -- which confuses itself.

I've also tried:

silent exec "r !bash -c \"svn log `cygpath -u \'" . file . "\'`\""

But I get an attempt to authenticate the user. Which is odd, because when I run the same command from the 'Start' menu or a command shell, I don't have to login.

How do I get svn to behave? Does anyone have a good plugin for vim for svn?

share|improve this question

By making the function SVNLog I have got around the path issues:

function! SVNLog()
  cd e:/code/wws_shared/sdk
  let file = system("cygpath -u '" . expand("%:p") . "'")
  silent exec "r !svn log " . file

I still had the authentication problem where the following output was piped to my temp file:

Authentication realm: <> Subversion Repository
Password for 'jh': 

I solved this by changing the silent exec ... above to exec "!svn log " . file, run once, enter password, change back to the original.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.