diff plugin/lawrencium.vim @ 41:decbefcf74db

Fixed problems with spaces in paths (thanks to @lllama).
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 10 Aug 2012 21:33:27 -0700
parents a63ec818ab21
children fc20a265551d
line wrap: on
line diff
--- a/plugin/lawrencium.vim	Fri Mar 30 15:29:10 2012 -0700
+++ b/plugin/lawrencium.vim	Fri Aug 10 21:33:27 2012 -0700
@@ -594,7 +594,7 @@
         call s:HgDiff_DiffThis()
     else
         let l:temp_file = tempname()
-        call l:repo.RunCommand('cat', '-r', '"'.l:rev1.'"', '-o', l:temp_file, l:path)
+        call l:repo.RunCommand('cat', '-r', '"'.l:rev1.'"', '-o', '"'.l:temp_file.'"', '"'.l:path.'"')
         execute 'edit ' . fnameescape(l:temp_file)
         " Make it part of the diff group.
         call s:HgDiff_DiffThis()
@@ -615,7 +615,7 @@
         execute l:diffsplit . ' ' . fnameescape(l:path)
     else
         let l:temp_file = tempname()
-        call l:repo.RunCommand('cat', '-r', '"'.l:rev2.'"', '-o', l:temp_file, l:path)
+        call l:repo.RunCommand('cat', '-r', '"'.l:rev2.'"', '-o', '"'.l:temp_file.'"', '"'.l:path.'"')
         execute l:diffsplit . ' ' . fnameescape(l:temp_file)
         " Remember the repo it belongs to.
         let b:mercurial_dir = l:repo.root_dir