[PATCH] setup: include package/build/distribution id from HG_PACKAGE in version string

Mads Kiilerich mads at kiilerich.com
Thu Oct 28 12:35:23 UTC 2010


On 10/28/2010 03:05 AM, Steve Borho wrote:
> On Wed, Oct 27, 2010 at 8:01 PM, Steve Borho<steve at borho.org>  wrote:
>> On Wed, Oct 27, 2010 at 7:36 PM, Mads Kiilerich<mads at kiilerich.com>  wrote:
>>> # HG changeset patch
>>> # User Mads Kiilerich<mads at kiilerich.com>
>>> # Date 1288226146 -7200
>>> # Branch stable
>>> # Node ID 0de6a2a4db2a0bb234edafe74992d0e56a16be4b
>>> # Parent  e1855dee28c164be291755af2e11b26efe77a64e
>>> setup: include package/build/distribution id from HG_PACKAGE in version string
>>>
>>> When replying to "issues" we often have to ask which package/installer has been
>>> used. This patch gives packagers a simple way of providing that information
>>> by putting some kind of build tag in the Mercurial version string.
>>>
>>> It should be made "mandatory" for packagers to set this to something like
>>> "TortoiseHg 1.2", "thg-winbuild", "thg-winbuild-2.6", "Berkwood", "Debian",
>>> "Ubuntu", "Fedora", "pypi" etc. That would often make it easier to answer
>>> support questions.
>>
>> Is this something we want in the version number?

That's a good question, but yes, I think so ,-)

There is a gap between what Mercurial as project delivers and what users 
actually use, and Mercurials own version number doesn't tell the whole 
story. In support situations it is always in our interest to get the 
full story. Including a build identifier brings us one step in the right 
direction.

>> I suspect many
>> scripts try to parse that value.
...
> I think I'm fine with it except for the part that
> annotates the output of 'hg version', unless we add extra output for
> 'hg version -v' or something.

Yes, we could restrict it to "version -v" just to minimize the risk, 
especially if we want it for 1.7. On the other hand we want users to 
tell us the full story if we ask what version they are using.

But if scripts are parsing the "hg version" output they must be used to 
ignore whatever comes at the end anyway, and appending extra information 
shouldn't make a difference. (I did however also choose to not include 
it in patchbomb User-Agent header, partly because I wasn't sure which 
side effects strange characters would have there.)

/Mads



More information about the Mercurial-devel mailing list