On 2007-10-11 15:13, Aubrey Li <[EMAIL PROTECTED]> wrote: >On 10/11/07, Dan Mick <[EMAIL PROTECTED]> wrote: >>Aubrey Li wrote: >>> On 10/11/07, Dan Mick <[EMAIL PROTECTED]> wrote: >>>> Aubrey Li wrote: >>>>> Hi list, >>>>> >>>>> -- Does hg support branch operation? If so, how to create one? >>>>> Whenever I type "hg branches", I got nothing, even after I use "hg >>>>> branch mine" to try to create a new on. >>>> I'm new to Hg, but I'll try: >>>> >>>> "Branch" isn't an operation, really, it's the result of two conflicting >>>> changes. >>>> There's no explicit "I want to go in a different direction here" command; >>>> you >>>> simply make whatever changes you want to make, and then at commit time, >>>> you may >>>> create more than one head if your changes are not a direct descendant of >>>> the tip >>>> revision. >>>> >>> It looks like head has a new meaning in hg. >> >> It's very similar to Teamware. "Two tips" is another way of thinking about >> it. > > hmm..., I'm only familiar with CVS, SVN, GIT..., not similar with them, ;-)
CVS, and SVN do not have the notion of 'two tips'. GIT has similar features with Hg. What you see as 'two tips' in Mercurial is just a way of describing 'forks' in the changeset ancestry, like this: [1]----[2]----[3]----[7] \ `---[4]----[5]----[6] This sort of changeset 'order' can be the result of "cloning" a tree at revision [3], then committing locally changes [4], [5] and [6], and finally pulling a new 'remote' change as change [7]. There are tools (like the Git 'rebase' commands, and the Mercurial 'MQ' extension), which can 'strip' the changes of the lower history branch, and merge them on top of the new remote tip(change [7] above). It may be interesting to read the following Mercurial Wiki pages too: http://www.selenic.com/mercurial/wiki/index.cgi/UsingExtensions http://www.selenic.com/mercurial/wiki/index.cgi/MqExtension If you need a book-style presentation of some of Hg's features, there is a book by Bryan O'Sullivan at: http://hgbook.red-bean.com/ _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org