[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


https://bz.mercurial-scm.org/show_bug.cgi?id=5293

            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
https://reviewboard-hg.mozilla.org
bf8ed95aaa1c438bc042f249a8d420069c2c9eaf+"

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

https://www.mercurial-scm.org/pipermail/mercurial/2007-October/014933.html
https://www.mercurial-scm.org/pipermail/mercurial/2008-March/018221.html
https://www.mercurial-scm.org/pipermail/mercurial-devel/2011-May/031976.html

`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