Michael Sperber writes:
This seems to me *exactly* the way Mercurial would work. Where does
it
fall down?
I don't know how to do "reset" in Mercurial. Is there a way,
preserving changesets and branch inclusion relationships? Note that
in git,
git checkout current; git reset --hard tip
is possible and will be equivalent to
git checkout current; git merge tip
because the latter merge is a fast-forward.
If instead I use MQ, the identities of D and E change every time I
push or pop.
Interesting. What's a "tree SHA1"?
In git, file contents are stored in blobs, which are a short "object
header" followed by the contents. The blob is stored in a file whose
name is the SHA1 of the contents. Note that a blob does not know what
its name is in the working tree.
A tree is a list of (SHA1 name mode) records. It is stored in a file
whose name is the SHA1 of the list. Each SHA1 may be a blob name, a
tree name, or (in very recent versions of git) a commit name, similar
to an SVN external object.
A commit is a structure containing author and committer information, a
list of commit SHA1s (the parents), and a tree SHA1.
Thus you can traverse the history DAG by using only the commits. You
can reconstruct the state from a commit by extracting the tree SHA1,
getting the corresponding tree object, and then populating a directory
tree with the files and subtrees in the list contained in that
object. You can tell whether two trees are identical or not by
comparing their SHA1s.
So maybe we can help you figure out how to do this stuff with
Mercurial. Where's the first difficulty?
I don't know how to do the equivalent of "git reset --hard" with
Mercurial.
It would be nice to be able to protect the receiving repository from
inadvertant branch changes. If we can't do that, then the whole named
branch thing probably can't be done. If it is possible to move
commits from one branch to another, that might do the trick.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta