- From: ak.miller at auckland.ac.nz (Andrew Miller)
- Subject: [cellml-dev] FW: Merge.
- Date: Fri, 30 Oct 2009 23:58:14 +1300
Alan Garny wrote:
>
Hi,
>
>
>
>
Seeing commits from others, I must confess that I don?t always find the
>
comment that accompanies them to be very useful. Note that I am likely
>
to be guilty of the same thing, not to mention my tendency at making
>
long comments (which I do on purpose, since it allows me and maybe
>
others to have a ?detailed? record of what I have been doing and why).
>
>
>
>
Still, something like ?Merge? doesn?t tell me much about what has been
>
merged, even though one can find out by clicking on the link and by
>
checking the graph page
>
(http://cellml-opencell.hg.sourceforge.net/hgweb/cellml-opencell/cellml-opencell/graph).
>
>
>
>
So, I was wondering whether it would be helpful to people to, at least,
>
mention in the comment to a commit the branch from which one is committing?
Often merges don't occur from a branch merge, but rather, when two
different heads arise. For example, if I commit, but don't push, then
someone else pushes their change to the repository, and then I pull,
then I need to merge before I can push, because there are now two heads:
+--- A old head
|---+ B my commit (new head #1)
|---+ C other person's commit (new head #2)
To resolve this, a merge (D) is needed. D then becomes the new head.
A
/ \
/ \
B C
\ /
\ /
D
Since there is now only one head, a push can be made. Mercurial will see
that C is already in the repository, but will send B and D, and update
the remote head to be D.
The substantive changes are in B and C. D is only there to resolve the
need to merge the two heads. It is therefore relatively unimportant to
the history of the source code, and the DVCS already has a record that
D's parent's are B and C. The commit comments for both B and C are what
you should be looking at to determine the history of the tree, and they
are in the history - that is the whole point of DVCS.
As D is usually generated automatically, and already carries metadata
about its parents, I don't think it makes sense to say any more in the
comment.
Best wishes,
Andrew
>
>
>
>
Alan
>
>
>
>
*Feed:* CellML
>
*Posted on:* 30 October 2009 05:10
>
*Author:* Randall Britten<r.britten at auckland.ac.nz>
>
*Subject:* Merge.
>
>
>
>
Merge.
>
>
>
View article...
>
<http://cellml-api.hg.sourceforge.net/hgweb/cellml-api/cellml-api/rev/f2de1d64be36>
>
>
>
------------------------------------------------------------------------
>
>
_______________________________________________
>
cellml-tools-developers mailing list
>
cellml-tools-developers at cellml.org
>
http://www.cellml.org/mailman/listinfo/cellml-tools-developers
Archive powered by MHonArc 2.6.18.