Frage

I need to edit hg files in vim. For now, when I need to see the history of the file, I need to locate this file, right click on this file and then select TortoiseHg->Revision History menu to get the history.

I have tried to find out the registry table of this menu. It's TortoiseHgCMenu and the value is {46605027-5B8C-4DCE-BFE0-051B7972D64C}. I don't know what does it means. I originally thought it should be like xxx.exe --special-paramter-to-open-the-revision-history-window.

So, is there any commands to open the revision history window? so that I can use it inside the vim.

War es hilfreich?

Lösung

There seems to be a thg.exe tool that allows to launch TortoiseHg tools from the command-line. With that, you can define a custom Vim command, e.g.

:command! HgLog call system('thg.exe log ' . shellescape(expand('%:p')))

Note: Untested; I don't have TortoiseHg installed; the tool will tell you which arguments it needs.

Alternative

If you'd rather stay in Vim for viewing the log (though the representation surely isn't as nice as in a dedicated GUI tool like TortoiseHg), I can recommend the excellent vcscommand.vim - CVS/SVN/SVK/git/hg/bzr integration plugin.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top