[Bug 5293] New: Need way to output 40-char hash from `hg id` without --debug flag

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Wed Jul 13 16:48:24 EDT 2016


            Bug ID: 5293
           Summary: Need way to output 40-char hash from `hg id` without
                    --debug flag
           Product: Mercurial
           Version: 3.8.3
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: alexhenrie24 at gmail.com
                CC: mercurial-devel at selenic.com

I am really hurting for a way to get the 40-character hash with the plus sign
if the working copy is modified. The usual recommendation seems to be `hg id -i
--debug`, but in addition to the full hash, that command outputs debug
information from installed extensions.

My specific problem is that I'm trying to compile Pidgin, but I have Mozilla
development extensions installed. Pidgin's build process runs `hg id -i
--debug` to generate the file package_revision.h, which works for most people,
but Pidgin won't compile for me because my package_revision.h contains extra
debug output:

#define REVISION "automatically setting Bugzilla API Key auth

Similar requests have been made on the mailing list several times over the


`hg id` ought to have a --long parameter or similar specifically for getting
the 40-char hash. If this were implemented, I could approach the Pidgin
developers and ask them to switch to it to make the build process less fragile.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Mercurial-devel mailing list