Re: newbie questions about git design and features (some wrt hg)
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:42:52
On 02.02.2004, Matt Mackall wrote:
On Fri, Feb 02, 2007 at 10:55:48AM +0100, Jakub Narebski wrote:
quoted
How Mercurial solves problem of multiple _persistent_ branches? Does it add pointers to commits somewhere deeper in changelog / revlog?Each changeset may have a branch marker.
By changeset you mean commit-revlog (changelog)?
Where those branch markers are stored? Are those markers moving pointers,
meaning that if you make a commit while on branch, branch marker for
current branch will move?
Static markers cannot identify branch in the presence of branch points:
---a<---b ........ side branch
/
1<---2<---3<---4<---5<---6<---7 ... main branch
^
:
''''' tag
Here's branches in use with an import of mutt's CVS history: $ hg branches mutt-0-94 208:b2cc0abd8fe0 HEAD 207:a505693b54c1 mutt-0-93 134:d59345944030 muttintl 1:29510de8b3fc
What is the first number? I understand that second is shortened (is it stored shortened, I wonder) hash identifier of a commit...
$ hg co HEAD 176 files updated, 0 files merged, 8 files removed, 0 files unresolved
Git (at least for now) writes nothing on checkout; it is planned that it would write changes status-like; perhaps summary would be enough... or is it only working area status that is to be written...
$ hg branch HEAD $ hg branch devel $ hg branch devel $ hg branch develquoted
BTW does Mercurial have tags?Yes. Both local and revision-controlled.
Revision-controlled (in-tree) tags are inane idea. Tags are non-moving (and sometimes annotated) pointers to given point in history. They should not depend on which branch you are, or what version you have checked out. Otherwise the following would not work: $ git reset --hard v1.0.0 $ git reset --hard v1.4.4.4 (it could be "git checkout" instead of "git reset --hard" in 'master' version of git, with "detached HEAD" / "anonymous branch" feature).
quoted
Nice to know. You compress only file deltas, or also file revision metadata? Do you compress manifests (trees) and commits (or at least commit messages) too?All three use the same underlying storage format, so yes.
But do you compress metadata (like base of a delta for file deltas, authorship of a commit and reference to manifest-log entry)? Do manifest is delta-encoded? -- Jakub Narebski Poland