Getting revision numbers from a centralized repository

Bill Barry after.fallout at gmail.com
Wed Jun 2 13:59:30 UTC 2010


Whenever we trade around revisions in talking to QA, we trade hyperlinks 
to the revisions on our central server hgwebdir instance. These links 
are very easy to get with an alias we add to our hgrc files:

[alias]
link = log --template "https://our.server.com/hg/reponame/rev/{node|short}"

then in cli we can write:

hg link -r -1
(or any local revision number)

and it returns a link to the revision on the central environment for us 
to copy and paste around to whomever needs it.

Additionally all of our changesets are expected to reference a bug 
number. When a change gets pushed to the central server, a hook there 
runs a regex against the commit messages and puts the text along with a 
link to the revision on the bug.


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.
>
> Any ideas?
>
> Thanks,
> Gili
>   




More information about the Mercurial mailing list