View mode: basic / threaded / horizontal-split · Log in · Help
January 26, 2011
Re: D Programming Language source (dmd, phobos,etc.) has moved to github
"Vladimir Panteleev" <vladimir@thecybershadow.net> wrote in message 
news:op.vpwco52etuzx1w@cybershadow.mshome.net...
> On Wed, 26 Jan 2011 04:40:03 +0200, Nick Sabalausky <a@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.
January 26, 2011
Re: D Programming Language source (dmd, phobos, etc.) has moved to github
As far as I can tell hg stores both a commit number and a hash, e.g.:

> D:\dev\projects\project>hg log -r :
changeset:   0:08d729df85c9
user:        Andrej Mitrovic <andrej.mitrovich@gmail.com>
date:        Fri Dec 22 00:07:02 2010 +0200
summary:     bla bla

changeset:   1:61cfebefee15
user:        Andrej Mitrovic <andrej.mitrovich@gmail.com>
date:        Fri Dec 24 21:42:45 2010 +0100
summary:     bla bla

I don't know the details, I've just started using hg recently.
January 26, 2011
Re: D Programming Language source (dmd, phobos,etc.) has moved to github
Vladimir Panteleev wrote:
> On Tue, 25 Jan 2011 23:08:13 +0200, Nick Sabalausky <a@a.a> wrote:
> 
>> Browsing through http://hginit.com/index.html, it looks like with Hg,
>> everything works just as well as with SVN, the only difference being that
>> you need to remember to specify which repository you're talking about
>> whenever you give a number.
> 
> Not just what repository, but what clone of the repository! It's 
> explained in http://hginit.com/05.html. The number only makes sense for 
> the clone of the repository you're working on right now - basically you 
> can't tell that number to anyone, because it might mean something 
> entirely different for them.
> 
>> Obviously I'm not saying "DMD should have gone Hg", I'm just kinda 
>> shocked
>> by how horrid Git's approach is for referring to changesets. (Personally,
>> that alone would be enough to get me to use Hg instead of Git for my own
>> projects. Heck, I've become pretty much sold on the idea of DVCS, but
>> because of this I think I'd actually sooner use SVN for a new project 
>> than
>> Git.)
> 
> I think you need to take some time and think about it. It's impossible 
> to use a global incrementing revision number with any DVCS!

I think this is a fallacy. It only applies if you
(1) *completely disallow* any centralisation -- which I don't think ever 
happens in practice!
and (2) demand that cloning a repository be an entirely read-only 
operation (so that the repository doesn't know how many times it has 
been cloned)
and (3) demand that the revision numbers behave exactly as they do in svn.

The SHA1 hashes are how many bits??? Enough for one commit from every 
person on earth, every few minutes, for hundreds of years!!!! That's a 
ridiculously inefficient method of identifying changesets.
Looks like a strawman argument to me. "It can't be done", but only 
because unnecessary requirements have been added.
January 26, 2011
Re: D Programming Language source (dmd, phobos, etc.) has moved to github
On Tuesday 25 January 2011 20:33:35 Don wrote:
> Vladimir Panteleev wrote:
> > On Tue, 25 Jan 2011 23:08:13 +0200, Nick Sabalausky <a@a.a> wrote:
> >> Browsing through http://hginit.com/index.html, it looks like with Hg,
> >> everything works just as well as with SVN, the only difference being
> >> that you need to remember to specify which repository you're talking
> >> about whenever you give a number.
> > 
> > Not just what repository, but what clone of the repository! It's
> > explained in http://hginit.com/05.html. The number only makes sense for
> > the clone of the repository you're working on right now - basically you
> > can't tell that number to anyone, because it might mean something
> > entirely different for them.
> > 
> >> Obviously I'm not saying "DMD should have gone Hg", I'm just kinda
> >> shocked
> >> by how horrid Git's approach is for referring to changesets.
> >> (Personally, that alone would be enough to get me to use Hg instead of
> >> Git for my own projects. Heck, I've become pretty much sold on the idea
> >> of DVCS, but because of this I think I'd actually sooner use SVN for a
> >> new project than
> >> Git.)
> > 
> > I think you need to take some time and think about it. It's impossible
> > to use a global incrementing revision number with any DVCS!
> 
> I think this is a fallacy. It only applies if you
> (1) *completely disallow* any centralisation -- which I don't think ever
> happens in practice!
> and (2) demand that cloning a repository be an entirely read-only
> operation (so that the repository doesn't know how many times it has
> been cloned)
> and (3) demand that the revision numbers behave exactly as they do in svn.
> 
> The SHA1 hashes are how many bits??? Enough for one commit from every
> person on earth, every few minutes, for hundreds of years!!!! That's a
> ridiculously inefficient method of identifying changesets.
> Looks like a strawman argument to me. "It can't be done", but only
> because unnecessary requirements have been added.

The main reason for the SHA1 is to verify that the repository hasn't been 
tampered with or corrupted. I suspect that Linus decided to just use it as the 
identifier for the changeset, because then you only have one number to worry 
about, not two (the hash and the changeset number). And given the difficulties 
with regards to incremental revision numbers in a distributed VCS (particularly 
one which allows for changes to the revision history), I can understand deciding 
to just not bother with them. Whether that was the best decision or not is 
another matter. Regardless, I don't think that SHA1 was picked as a changeset ID 
because of how many revision numbers it can hold.

- Jonathan M Davis
January 26, 2011
Re: D Programming Language source (dmd, phobos,etc.) has moved to github
Nick Sabalausky Wrote:

> 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.

LOL, this meaningless gibberish is usually called a unique identifier.
January 26, 2011
Re: D Programming Language source (dmd, phobos,etc.) has moved to github
On Wed, 26 Jan 2011 06:33:35 +0200, Don <nospam@nospam.com> wrote:

> I think this is a fallacy. It only applies if you
> (1) *completely disallow* any centralisation -- which I don't think ever  
> happens in practice!

What about the Linux kernel? There's Linus's git repo, and lots of repos  
maintained by others (e.g. Linux distros). The other distros are not a  
superset of Linus's repo, they have their own branches with various  
project-specific patches and backports. Git was written for this  
specifically.

> and (2) demand that cloning a repository be an entirely read-only  
> operation (so that the repository doesn't know how many times it has  
> been cloned)
> and (3) demand that the revision numbers behave exactly as they do in  
> svn.

Then you're suggesting that the commit identifiers basically contain the  
clone history?

-- 
Best regards,
 Vladimir                            mailto:vladimir@thecybershadow.net
January 26, 2011
Re: D Programming Language source (dmd, phobos,etc.) has moved to github
== Repost the article of Kagamin (spam@here.lot)
== Posted at 2011/01/26 07:31 to digitalmars.D.announce

>Nick Sabalausky Wrote:

>> 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.

>LOL, this meaningless gibberish is usually called a unique identifier.

And I use git to download the source from github.com for "druntime".
But I found that in it subdirectory "import", there is only contain "std" and
"object.di", missed the "core" subdirectory for druntime.
Why?

Or, the "core" subdirectory exists on the github.com, but we can no see it?
or there have some other way except git to download it?

waiting for kindly help.

Best regards
David.
January 26, 2011
Re: D Programming Language source (dmd, phobos,etc.) has moved to github
On Wed, 26 Jan 2011 15:10:08 +0200, David Wang <osx.david@live.com> wrote:

> And I use git to download the source from github.com for "druntime".
> But I found that in it subdirectory "import", there is only contain  
> "std" and
> "object.di", missed the "core" subdirectory for druntime.
> Why?
>
> Or, the "core" subdirectory exists on the github.com, but we can no see  
> it?
> or there have some other way except git to download it?
>
> waiting for kindly help.
>
> Best regards
> David.

The source code of druntime is under the src/core directory[1]. The .di  
files in the import directory are generated automatically during the  
build[2].

  [1]:  
https://github.com/D-Programming-Language/druntime/tree/master/src/core
  [2]:  
https://github.com/D-Programming-Language/druntime/blob/master/win32.mak#L361

-- 
Best regards,
 Vladimir                            mailto:vladimir@thecybershadow.net
January 26, 2011
Re: D Programming Language source (dmd, phobos, etc.) has moved to github
On Tue, 2011-01-25 at 21:24 -0500, Nick Sabalausky wrote:
[ . . . ]
> Ulrick mentioned that history rewriting is "encouraged under some particular 
> circumstances". What circumstances would those be?

Rebasing/rewriting of private, never published repositories is
absolutely fine, and is encouraged for preparing a repository for
creation of changesets/patches where it is not possible to simply
publish the repository and issue a pull request.

In all other circumstances rebasing/rewriting is discouraged.  Well
actually as close to being banned as it is possible to get.
Rebasing/rewriting an already published repository is a catastrophic
event that ruins relationships with clones (due to the history
rewriting!).

Git repositories used as writing clients to Subversion repositories
(using git-svn) have to do rebasing as an integral part of the writing
to the Subversion repository.  This means they have to be personal
clients only.  Read-only is a way of bridging of course since there is
no rebasing.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
January 26, 2011
Re: D Programming Language source (dmd, phobos,etc.) has moved to github
Nick Sabalausky Wrote:

> 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.

A little example: today I commited changeset 35912, and 35780 - 10 day ago. Try to recall these random-looking numbers after reading a couple of posts in this NG.
2 3 4 5 6 7 8 9
Top | Discussion index | About this forum | D home