reflections about Mercurial

JK jakubi at email.cz
Thu Dec 26 20:42:33 UTC 2013


Hi, I would like to share some terminological reflections of mine with 
other readers.

At http://mercurial.selenic.com/wiki/Head we can read following definitions:

  * head -- a changeset that has no children
  * branch head -- a changeset in a branch that has no children in that
    branch

OK, one has to take into account that the repository´s DAG can resemble 
a branch (or twig) only by chance. OK, never mind.

According to this declarations, we can see two kinds of heads in the 
DAG: heads and branch heads.  In a simplified way:  heads == heads and 
branch heads, which is a little bit queer.
It is a pity, we can´t say: heads == topological heads and branch heads, 
which is quite normal and corresponding to reality but not to the above 
mentioned definitions.

Mercurial commands hg head and hg heads do the same action - return a 
list of heads, with the possibility to narrow the selection using the -t 
option.
It is a pity, there does not exist the like option -b for branch heads. 
It could by used for listing of merge changesets.

There exists a little assymetry in viewing heads. Hg head returns all 
existing topological heads but only the last branch head for each branch 
- if there doesn´t exist the topological one.
Maybe, the "branch head" is a term not happily introduced. One and the 
same changeset can be assessed as a branch head and as no head at all - 
without changing the configuration of changesets in its "twig loop".

Another confusing term is "anonymous branch". Trying to learn Mercurial, 
we have to get know, that anonymous !== nameless but anonymous == with 
the name "default", which is unnecessarily counterintuitive.

The term "repository" is quite often used in vague, inaccurate context. 
Could we agree, that a repository is not a working directory nor the 
root directory of the .hg folder, I would like to suggest that the 
latter item be named as the *repositorium*. This division of meanings:

  * repositorium -- a sentient root directory containing the folder .hg
  * repository -- a folder .hg plus an abstract concept
  * working directory -- an abstract concept plus real files and folders

would facilitate introductory explanations for beginners and give 
precision in exchanging ideas among advanced users.

Disclaimer:
I am not a seasoned user of Mercurial nor any other (D)VCS. My interest 
in this system stems primarily from my needs as a translator of its 
documentation into the Czech language -- so please, take my observations 
with reserve.

Best wishes, Tovim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20131226/69e6dad9/attachment-0002.html>


More information about the Mercurial mailing list