re-enable executable quoting removed in 1.99.43.
authorBob Hiestand <bob.hiestand@gmail.com>
Thu, 11 Apr 2013 19:25:06 +0000 (11 14:25 -0500)
committerBob Hiestand <bob.hiestand@gmail.com>
Fri, 12 Apr 2013 15:04:40 +0000 (12 10:04 -0500)
Remove special-casing of sxq for Windows, as VIM does that now.

Always call shellescape() on the executable name in s:Executable().

plugin/vcsbzr.vim
plugin/vcscommand.vim
plugin/vcscvs.vim
plugin/vcsgit.vim
plugin/vcshg.vim
plugin/vcssvk.vim
plugin/vcssvn.vim

index 966f2ee..2e9c53b 100644 (file)
@@ -65,7 +65,7 @@ let s:bzrFunctions = {}
 " Returns the executable used to invoke bzr suitable for use in a shell
 " command.
 function! s:Executable()
-       return VCSCommandGetOption('VCSCommandBZRExec', 'bzr')
+       return shellescape(VCSCommandGetOption('VCSCommandBZRExec', 'bzr'))
 endfunction
 
 " Function: s:DoCommand(cmd, cmdName, statusText) {{{2
index 2726436..e88e3af 100644 (file)
@@ -378,31 +378,21 @@ endfunction
 " command line on Windows systems.
 
 function! s:VCSCommandUtility.system(...)
-       if (has("win32") || has("win64")) && &sxq !~ '"'
-               let save_sxq = &sxq
-               set sxq=\"
-       endif
-       try
-               let output = call('system', a:000)
-               if exists('*iconv') && has('multi_byte')
-                       if(strlen(&tenc) && &tenc != &enc)
-                               let output = iconv(output, &tenc, &enc)
-                       else
-                               let originalBuffer = VCSCommandGetOriginalBuffer(VCSCommandGetOption('VCSCommandEncodeAsFile', 0))
-                               if originalBuffer
-                                       let fenc = getbufvar(originalBuffer, '&fenc')
-                                       if fenc != &enc
-                                               let output = iconv(output, fenc, &enc)
-                                       endif
+       let output = call('system', a:000)
+       if exists('*iconv') && has('multi_byte')
+               if(strlen(&tenc) && &tenc != &enc)
+                       let output = iconv(output, &tenc, &enc)
+               else
+                       let originalBuffer = VCSCommandGetOriginalBuffer(VCSCommandGetOption('VCSCommandEncodeAsFile', 0))
+                       if originalBuffer
+                               let fenc = getbufvar(originalBuffer, '&fenc')
+                               if fenc != &enc
+                                       let output = iconv(output, fenc, &enc)
                                endif
                        endif
-
-               endif
-       finally
-               if exists("save_sxq")
-                       let &sxq = save_sxq
                endif
-       endtry
+
+       endif
        return output
 endfunction
 
index 11c7433..fe6db21 100644 (file)
@@ -111,7 +111,7 @@ let s:cvsFunctions = {}
 " Returns the executable used to invoke cvs suitable for use in a shell
 " command.
 function! s:Executable()
-       return VCSCommandGetOption('VCSCommandCVSExec', 'cvs')
+       return shellescape(VCSCommandGetOption('VCSCommandCVSExec', 'cvs'))
 endfunction
 
 " Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
index 2667982..a893d15 100644 (file)
@@ -70,7 +70,7 @@ let s:gitFunctions = {}
 " Returns the executable used to invoke git suitable for use in a shell
 " command.
 function! s:Executable()
-       return VCSCommandGetOption('VCSCommandGitExec', 'git')
+       return shellescape(VCSCommandGetOption('VCSCommandGitExec', 'git'))
 endfunction
 
 " Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
index 775ede0..9dbbde8 100644 (file)
@@ -72,7 +72,7 @@ let s:hgFunctions = {}
 " Returns the executable used to invoke hg suitable for use in a shell
 " command.
 function! s:Executable()
-       return VCSCommandGetOption('VCSCommandHGExec', 'hg')
+       return shellescape(VCSCommandGetOption('VCSCommandHGExec', 'hg'))
 endfunction
 
 " Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
index bee84c3..f04c9cc 100644 (file)
@@ -65,7 +65,7 @@ let s:svkFunctions = {}
 " Returns the executable used to invoke SVK suitable for use in a shell
 " command.
 function! s:Executable()
-       return VCSCommandGetOption('VCSCommandSVKExec', 'svk')
+       return shellescape(VCSCommandGetOption('VCSCommandSVKExec', 'svk'))
 endfunction
 
 " Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2
index 8ad6388..a7fe7e5 100644 (file)
@@ -72,7 +72,7 @@ let s:svnFunctions = {}
 " Returns the executable used to invoke git suitable for use in a shell
 " command.
 function! s:Executable()
-       return VCSCommandGetOption('VCSCommandSVNExec', 'svn')
+       return shellescape(VCSCommandGetOption('VCSCommandSVNExec', 'svn'))
 endfunction
 
 " Function: s:DoCommand(cmd, cmdName, statusText, options) {{{2