Nomenclature

Gustavo Niemeyer gustavo at niemeyer.net
Fri Sep 30 17:18:26 BST 2005


Hello John,

> Sounds like a good idea. I will try and give my understanding of the
> different conventions in use. Obviously Martin is the ultimate locus
> of meaning, since he did the bulk of the work. Probably some of the
> differences are because of the many cooks, and that does need a good
> convention to keep things from spoiling. :)

Yes, I certainly understand how we got here. I'd just like to
see these issues being fixed in the future, if at all possible.

> >* revno vs. rev_id
> 
> revno is an integer which represents a particular revision present in 
> "revision-history".
> rev_id or revision_id is the actual hash (such as 
> john at arbash-meinel.com-2005060912341-a34aeou2h34a)
> 
> The idea is that user input will frequently be a revision number (it 
> used to be the only way you could do input). Because nobody wants to 
> type a hash.
[...]

Please, notice that I'm talking about small incoherences here, not
about what each variable means. I'm not even telling what's my own
preference, even though I certainly have one. I'd just like to see
the conventions unified, whatever is the chosen convention.

In other words, either revno and revid, or rev_no and rev_id, but
not revno and rev_id. And so on...

> >* branch.get_revision_*() vs. branch.revision_*()
> 
> I personally prefer the get_revision* forms. But I think in general the 
> usage has been get_revision* when you are getting some particular bit of 
> a revision, and revision_* when you are getting something related. For 
[...]

Same case.. either branch.get_revision_history() and
branch.get_revision(), or branch.revision_history() and
branch.revision().

> >* branch.get_rev_id() vs. branch.revision_id_to_revno() vs. *.id2*()
> get_rev_id translates the above revno into a revision_id. 
> revision_id_to_revno is the opposite translation.

Same case. If they are exactly the opposite of each other, why one
is named get_rev_id() and the other revision_id_to_revno()? :-)

And I think you got the idea...

-- 
Gustavo Niemeyer
http://niemeyer.net




More information about the bazaar mailing list