D Programming Language source (dmd, phobos, etc.) has moved to github

Nick Sabalausky a at a.a
Tue Jan 25 20:24:42 PST 2011


"Vladimir Panteleev" <vladimir at thecybershadow.net> wrote in message 
news:op.vpwco52etuzx1w at cybershadow.mshome.net...
> On Wed, 26 Jan 2011 04:40:03 +0200, Nick Sabalausky <a at a.a> wrote:
>
>> Well, normally there's at least *some* repository that's remotely
>> accessible, otherwise nobody would (or even could) be doing any cloning 
>> or
>> pulling or pushing (and you'd be left with a single-user private SVN with
>> better merging).
>
> Thus the question is - does Hg even allow you to (easily) inspect revision 
> numbers of an arbitrary remote repository?

Yes. Exhibits A, B and C:

- Joel's HgInit: http://hginit.com/01.html (Do a text-search inside the page 
for "changeset:")
- Trac's Hg browser: http://www.dsource.org/projects/ddmd/browser
- Hg's built-in html browser: 
http://hg.dsource.org/projects/ddmd/rev/13cf8da225ce

It seems to be typical convention in the Hg world for changesets to be 
displayed in the format "revision:hash". I would imagine you could use 
either one by itself to refer to a specific commit (don't know for certain 
though, haven't used it enough).

> Are they preserved while cloning?

Maybe someone with real Hg experience could answer this. I'd be surprised if 
the answer is "no", since it is supposed to be a "clone" after all, but I 
really don't know.


> Also, how would you look up the revision number of a specific  commit in 
> another repository? By its hash?

Not sure what you mean. A commit in a given repo has both a revision number 
and a hash so I'd image you could use either one to look up the other.

If you mean that you have a revision number in your local repo and want to 
find the revision number of the same changeset in a remote repo, then yes, 
you would have to use the hash as a go-between. But I see no technical 
reason why it shouldn't be possible for that to entirely do-able 
behind-the-scenes as long as there's a way to specify a specific remote 
repository. Whether or not Hg currently has such an automatic ability, I 
have no idea.


> Why not just give other people the hash directly? :)
>

official public repo: r184
official public repo: r185
...etc.

Versus:

9f4e5ac4f0a3
13cf8da225ce
...etc.

I don't know about other people, but I find the former to be far more 
readable, far more descriptive, and actually possible to reason about. Sure, 
the latter can be copy-pasted and it still refers to the same changeset, but 
other then that it's meaningless gibberish.





More information about the Digitalmars-d-announce mailing list