Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see Mercurial commands issued by Tortoise HG?

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.

like image 210
Sylvain Avatar asked Apr 08 '10 12:04

Sylvain


People also ask

How do I check my Mercurial version?

If you already have Mercurial installed, make sure you have version 1.7 or later. To check, enter hg --version at the command line.

Where is the Mercurial INI file?

Mercurial on Windows has a three-tier configuration system. A site-wide configuration file in C:\Program Files\TortoiseHg\Mercurial. ini This file is read first and thus has the lowest priority. A per-user configuration file in C:\Documents and Settings\username\Mercurial.

What is Mercurial changeset?

A changeset (sometimes abbreviated "cset") is an atomic collection of changes to files in a repository. It contains all recorded local modification that lead to a new revision of the repository. A changeset is identified uniquely by a changeset ID. In a single repository, you can identify it using a revision number.


1 Answers

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 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 - in CmdRunner::execute(), print cmdline tortoisehg/util/hglib.py - in hgcmd_toq(), print args

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

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.

like image 164
Steve Borho Avatar answered Sep 21 '22 21:09

Steve Borho