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

Nick Sabalausky a at a.a
Tue Jan 25 14:37:40 PST 2011


"Lutger Blijdestijn" <lutger.blijdestijn at gmail.com> wrote in message 
news:ihnh65$ak4$1 at digitalmars.com...
> Nick Sabalausky wrote:
>
>> "Lutger Blijdestijn" <lutger.blijdestijn at gmail.com> wrote in message
>> news:ihn21d$2esd$1 at digitalmars.com...
>>> Nick Sabalausky wrote:
>>>
>>>> "David Nadlinger" <see at klickverbot.at> wrote in message
>>>> news:ihkub8$1ia4$1 at digitalmars.com...
>>>>> On 1/24/11 10:20 PM, Nick Sabalausky wrote:
>>>>>>>> Does Git really not have real revision/changeset numbers?
>>>>>>>
>>>>>>>[.]
>>>>>>>
>>>>>>
>>>>>> Not that I've actually used DVCSes much yet, but my understanding is
>>>>>> that the same can be set of Hg and yet Hg handles revision/changeset
>>>>>> numbers just
>>>>>> fine. The nice things (plural) about those is that they're both
>>>>>> readable
>>>>>> and
>>>>>> comparable.
>>>>>
>>>>> Hg has no ?real revision/changeset numbers? either - there is a
>>>>> more-or-less-monotonic number assigned to the various changesets, but
>>>>> it's only valid for a single, *local* checkout, using them e.g. in a 
>>>>> NG
>>>>> post would be a very wrong thing to do
>>>>> (http://mercurial.selenic.com/wiki/RevisionNumber).
>>>>>
>>>>
>>>> Even without really using DVCSes it always seemed clear to me that an
>>>> incremented number would be relative to a particular branch. So if you
>>>> specify what branch you're talking about (which could usually just be
>>>> assumed to be the main official one unless otherwise specified),
>>>> shouldn't
>>>> that be enough?
>>>>
>>>>> Git supports a relative notation as well, which is what I personally
>>>>> want
>>>>> to use most of the time anyway (e.g. HEAD^, master~4, something@{"1
>>>>> year ago"}, .).
>>>>
>>>> Ah, so it *does* then? Great! Happen to have a link that explains it?
>>>>
>>>
>>> This covers most of it to see what's possible:
>>>
>>> http://progit.org/book/ch6-1.html
>>>
>>> You can customize git log with a format string, try this for example:
>>>
>>> git log --pretty=format:"%h - %an, %ar : %s %d"
>>>
>>
>> Ahh, that's not remotely what I was hoping it was. Everything is all
>> relative to the current version which means that *every* time you commit,
>> *every* changeset gets completely renamed (HEAD@{5} becomes HEAD@{6},
>> etc), and there doesn't appear to be any syntax to refer to the next
>> changeset (only the previous), which makes it barely useful at all. And
>> not only that, but they *dissapear* after a certain amount of time.
>>
>> 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.
>
> I see, you want a convenient name for a particular commit, is that it? But
> even the hg revision number is discouraged to be used to talk with others,
> this is from the manual:
>
> "It is a strictly local convenience identifier (...) Revision numbers
> referring to changesets are very likely to be different in another copy of 
> a
> repository. Do not use them to talk about changesets with other people"
>

This part is the whole crux of it:

"Revision numbers referring to changesets are very likely to be different in 
another copy of a repository."

Which is why I keep saying "plus which repository you're talking about". How 
is that ambinguous or problematic? People keep implying that it is ambiguous 
or problematic, but no one says "how" except when rehashing the strawman of 
pretending as if I had never said "plus which repository you're talking 
about".

...Plus which repository you're talking about.
...Plus which repository you're talking about.
...Plus which repository you're talking about.
.
.
.
.
...Plus which repository you're talking about.

> When there is a lot of branching going on (even in a local repository) 
> these
> revisions numbers become useless and confusing. A unique identifier is 
> much
> more useful.

Agreed. And something that incorporates both a sequential number and a 
sensible system of referring to a particular repository (some sort of URI, 
for instance) can be used as not only a unique identifier, but a unique 
identifier that's actually readable and means something.


> You can't expect other people to piece together how the
> revision number has come to be, that is extremely brittle.
>

They don't need to piece it together because you can just say...

...which repository you're talking about.
...which repository you're talking about.
...which repository you're talking about.
.
.
.
.
...which repository you're talking about.
.
.
.
.
.






More information about the Digitalmars-d-announce mailing list