Getting revision numbers from a centralized repository

Matt Mackall mpm at selenic.com
Wed Jun 2 14:53:41 UTC 2010


On Wed, 2010-06-02 at 05:46 -0700, cowwoc wrote:
> Hi,
> 
> Assuming my developers pull/push change-sets from a centralized "official"
> repository, is there a simple way (i.e. one liner) for them to look up the
> revision number of a change-set with respect to this official repository? I
> know that revision numbers are only guaranteed relative to a specific
> repository, which is why I want to use the official repository.
> 
> Some background about this: I realize that Hg encourages the use of
> hexadecimal change-sets, but posting "fixed in changeset <40 character
> sequence>" is not very nice. I'd like QA and developers to pass version
> numbers between one another using the shorter, easier-to-remember, revision
> numbers.

You're just making more work for people. When someone wants to actually
USE 'revision 3453', they're going to have to go look it up on the main
server each time, get its hash and then use that. Which means you now
have significantly more work on BOTH ends than simply cutting and
pasting. And when someone forgets to translate the central number to a
hash, they'll get confused for who knows how long, which is
significantly more expensive still.

Also, there are very few places Mercurial ever visibly uses the full
40-digit hash. Even our horrible gitweb style doesn't do that. 'hg
export' is about the only one you're likely to have used. 

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list