Mercurial > vim-lawrencium
comparison 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 |
comparison
equal
deleted
inserted
replaced
40:a63ec818ab21 | 41:decbefcf74db |
---|---|
592 endif | 592 endif |
593 " Make it part of the diff group. | 593 " Make it part of the diff group. |
594 call s:HgDiff_DiffThis() | 594 call s:HgDiff_DiffThis() |
595 else | 595 else |
596 let l:temp_file = tempname() | 596 let l:temp_file = tempname() |
597 call l:repo.RunCommand('cat', '-r', '"'.l:rev1.'"', '-o', l:temp_file, l:path) | 597 call l:repo.RunCommand('cat', '-r', '"'.l:rev1.'"', '-o', '"'.l:temp_file.'"', '"'.l:path.'"') |
598 execute 'edit ' . fnameescape(l:temp_file) | 598 execute 'edit ' . fnameescape(l:temp_file) |
599 " Make it part of the diff group. | 599 " Make it part of the diff group. |
600 call s:HgDiff_DiffThis() | 600 call s:HgDiff_DiffThis() |
601 " Remember the repo it belongs to. | 601 " Remember the repo it belongs to. |
602 let b:mercurial_dir = l:repo.root_dir | 602 let b:mercurial_dir = l:repo.root_dir |
613 endif | 613 endif |
614 if l:rev2 == 'lawrencium#_wdir_' | 614 if l:rev2 == 'lawrencium#_wdir_' |
615 execute l:diffsplit . ' ' . fnameescape(l:path) | 615 execute l:diffsplit . ' ' . fnameescape(l:path) |
616 else | 616 else |
617 let l:temp_file = tempname() | 617 let l:temp_file = tempname() |
618 call l:repo.RunCommand('cat', '-r', '"'.l:rev2.'"', '-o', l:temp_file, l:path) | 618 call l:repo.RunCommand('cat', '-r', '"'.l:rev2.'"', '-o', '"'.l:temp_file.'"', '"'.l:path.'"') |
619 execute l:diffsplit . ' ' . fnameescape(l:temp_file) | 619 execute l:diffsplit . ' ' . fnameescape(l:temp_file) |
620 " Remember the repo it belongs to. | 620 " Remember the repo it belongs to. |
621 let b:mercurial_dir = l:repo.root_dir | 621 let b:mercurial_dir = l:repo.root_dir |
622 " Make sure it's deleted when we move away from it. | 622 " Make sure it's deleted when we move away from it. |
623 setlocal bufhidden=delete | 623 setlocal bufhidden=delete |