On Tue, May 28, 2013 at 11:46 AM, Laurens Van Houtven <_...@lvh.io> wrote:
> > >> A tangent: Note that when you "edit" a check-in, you are not really >> changing the check-in. You are, instead, adding additional information. >> Fossil does not erase or modify, it only augments. The original check-in >> comment, and time, and branch are all still there for anybody to see. By >> 'editing' the commit, you are adding a new record to the repository that >> says "for display purposes, modify checking XYZ as follows..." >> > > Right, that philosophy is one of the main reasons I want to get rid of git > :) One thing I'm confused about though: "for display purposes"? I > understand the ledger-like behavior of recording the change instead of > changing the original, but I would expect that the checkin is for all > intents and purposes in the new branch, not just for display ones. > The "branch" that a check-in belongs to is the value of its "branch" property. (Hence, a check-in can only belong to one branch at a time). To move a check-in from one branch to another, one merely adds a new record to the repository that says "use XYZ instead of ABC as the value of the branch property for check-in PQR". See http://www.fossil-scm.org/fossil/info/4e573871bcef9199 for an example of how this works. The original value for "branch" was "trunk" (which it inherited from its parent check-in). But then a new record was added to the repository (the http://www.fossil-scm.org/fossil/info/33366a18c0artifact) that changed the value of the "branch" property to "cleanDashN". > > Notes also that Fossil allows you to start a new branch named (for >> example) "experimental" even if there already exists one or more other >> branches with the same name. At >> http://www.fossil-scm.org/fossil/timeline?n=200&r=experimental it looks >> like there are a dozen or more "experimental" branches currently in the >> Fossil tree. >> > > I knew that in the back of my head, but that definitely helped my > understanding: I was still thinking in terms of one single review branch > :-) Can commits be in multiple branches? > > The "branch" is just a convenient tag, nothing more. There is nothing magic about a branch. The important data structure is the underlying directed acyclic graph (DAG) that defines the history of the project. You can tag and retag various subgraphs in the DAG any way you want. (Presumably you will choose a tagging scheme that helps you to track your project, but Fossil does not enforce that.) Technically, "branch" is a property of the check-in since it has exactly one value. Because it only has one value, a check-in can only be on one branch at a time. Notice that changing the value of the branch property (which is to say, moving a check-in from one branch to another) does not change the DAG at all. It merely labels the nodes differently, which causes the nodes to be drawn in different columns of the timeline graph. The ancestry and content of the check-in are unaffected by this. -- D. Richard Hipp d...@sqlite.org
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users