如何查看Tortoise HG发出的Mercurial命令? [英] How to see Mercurial commands issued by Tortoise HG?

查看:97
本文介绍了如何查看Tortoise HG发出的Mercurial命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有办法查看Tortoise HG发出哪些Mercurial命令吗?例如,如果我在Tortoise中使用Shelve命令,我想看看它在后台如何(以及是否)称呼"hg shelve".

I there a way to see what Mercurial commands are issued by Tortoise HG? For instance, if I use the Shelve command in Tortoise, I'd like to see how (and if) it calls 'hg shelve' under the hood.

推荐答案

在某些工具中,有一个查看->始终显示输出"选项.它使命令在控制台窗口中运行.尽管显示的命令行经常会被截断,因为它可能包含密码.

In some tools, there's a "View->Always Show Output" option. It causes commands to run in a console window. Though often the displayed command line is truncated because it could contain passwords.

TortoiseHg在多个API层使用Mercurial,因此没有通用的位置来获取它发出的所有命令.但是,有一些打印语句可以使您受益匪浅.

TortoiseHg uses Mercurial at multiple API layers, so there's no universal place to get all the commands it issues. But a couple print statements could get you pretty far.

tortoisehg/hgtk/hgcmd.py-在CmdRunner :: execute()中,打印cmdline tortoisehg/util/hglib.py-在hgcmd_toq()中,显示参数

tortoisehg/hgtk/hgcmd.py - in CmdRunner::execute(), print cmdline tortoisehg/util/hglib.py - in hgcmd_toq(), print args

要查看打印语句,通常必须在环境中设置THGDEBUG,然后使用--nofork选项运行hgtk.

To see print statements, you typically have to set THGDEBUG in your environment, and run hgtk with the --nofork option.

尤其是货架很难被拦截,因为几乎所有的代码都在TortoiseHg内部.我们有本地扩展名的副本,然后直接调用它.

Shelve in particular is difficult to intercept, because nearly all of that code is internal to TortoiseHg. We have a local copy of the shelve extension and call into it directly.

这篇关于如何查看Tortoise HG发出的Mercurial命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆