Skip to content

Instantly share code, notes, and snippets.

@ursm
Created September 8, 2008 15:27
Show Gist options
  • Save ursm/9459 to your computer and use it in GitHub Desktop.
Save ursm/9459 to your computer and use it in GitHub Desktop.
let s:prefix = 'HG: changed '
let s:files = map(filter(getline(0, '$'), 'v:val =~ "^" . s:prefix'), 'strpart(v:val, strlen(s:prefix))')
if len(s:files) == 0
finish
end
new
setlocal filetype=diff bufhidden=delete buftype=nofile previewwindow nobackup noswapfile
execute 'normal! :0r!hg diff ' . join(s:files) . "¥n¥<CR>"
setlocal nomodifiable
goto
redraw!
wincmd R
wincmd p
goto
redraw!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment