0

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?

1 Answer 1

0

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") . "'")
  new
  silent exec "r !svn log " . file
endfunction

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

Authentication realm: <http://svn.mydomain.com:80> 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .