Differences between revisions 5 and 6
Revision 5 as of 2006-02-10 09:27:44
Size: 2773
Editor: EmanueleAina
Comment: Added the explanation of named branches given by Matt on the Cairo ml
Revision 6 as of 2007-02-17 02:02:46
Size: 4247
Editor: LidiaYngsdal
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
At any time, you can view the ["Head"](s) of a ["Repository"] with the command {{{hg heads}}}.  At any time, you can view the ["Head"](s) of a ["Repository"] with the command {{{hg heads}}}.
Line 55: Line 55:
 [http://fluctuant.wtcsites.com/89.html creative webcam stalls] | [http://bastinado.freewebpages.org/18.html femdom mmf] | [http://failles.angelcities.com/41.html gay facial humiliation] | [http://binged.greatnow.com/46.html school girl getting] | [http://imagist.freecities.com/21.html fucking student cunts] | [http://bohemians.exactpages.com/68.html no nudity webcam] | [http://diademed.bravepages.com/53.html hot college lesbians] | [http://smuggles.150m.com/86.html girls masturbating mpeg] | [http://howdy.00freehost.com/77.html girls shower webcam] | [http://wriggle.1sweethost.com/95.html very old seniors] | [http://mesas.1accesshost.com/19.html no nudity webcam] | [http://skivvying.150m.com/57.html rhenee sex webcam] | [http://bailee.dreamstation.com/61.html horny webcam] | [http://ipecacs.150m.com/12.html webcam teen sexy] | [http://saviour.1accesshost.com/42.html adult webcam uk] | [http://homepage.mac.com/shit3/94.html piss drinking] | [http://gravel.exactpages.com/32.html webcam sex free] | [http://kitted.wtcsites.com/84.html live webcam hosting] | [http://howdy.00freehost.com/49.html boy girl webcam] | [http://similar.741.com/34.html gay urination watersports] | [http://nestled.angelcities.com/95.html plumper cock] | [http://rouen.freewebsitehosting.com/78.html live webcam london] | [http://hippo.envy.nu/66.html sexy lesbian naked] | [http://teensiest.fcpages.com/84.html amateur twink] | [http://bassos.dreamstation.com/55.html horny teenager]

A ["Repository"] may have multiple ["Head"]s, which is useful in at least two cases:

  • As part of a ["Merge"] (generally temporary)
  • Bugfix versions (generally permanent)

At any time, you can view the ["Head"](s) of a ["Repository"] with the command hg heads.

Not all ["SCM"] tools support ongoing MultipleHeads, since it is possible to achieve the same results with multiple repositories instead. However, especially if you are used to ["CVS"], MultipleHeads may be more familiar or convenient.

Merging

First, the ["ChangeSet"]s to be merged are ["Pull"]ed from the source ["Repository"] into the destination ["Repository"]. At that point, the original ["Tip"] is still a ["Head"], but the ["Tip"] of the source ["Repository"] is also a ["Head"]. Normally this case of MultipleHeads is only temporary, as the two ["Head"]s are usually joined back into one right away, by performing a ["Merge"].

Bugfix Versions

Let's compare a scenario with and without MultipleHeads. Imagine a project releases version 1.0, and then 2.0, and then discovers a critical bug in 1.0 that must be fixed. Current work on the upcoming 3.0 version is ongoing.

Without MultipleHeads, you would ["Clone"] the ["Repository"] each time you ["Tag"] a release. To work on version 1.1, you would ["Clone"] the 1.0 ["Repository"] and work on that, separately from the ["Repository"] you are using for current development. One drawback of this approach is that you can't directly access the 1.1 work while you are working on the current code.

With MultipleHeads, you can perform 1.1 work inside the current (pre-3.0) ["Repository"]. Just use ["Update"] to populate your WorkingDirectory with the contents of the 1.1 ["Tag"], make your changes, and ["Commit"]. To continue working on pre-3.0, just use ["Update"] again to reset your WorkingDirectory to that code base.

MultipleHeads allows a single ["Repository"] to contain the entire history of a project, including bugfix branches.

Named branches

If a branch descend from a tagged revision, the whole branch inherits the tag. Briefly, if you tag a commit "A", each descendant of A will inherit "A" as a "branch name" until it gets a different tag. Descendents of a merge receive the union of names from each side.

So you can do:

$ hg heads -b
changeset:   1704:c2755eba8631
tag:         tip
branch:      0.8
user:        Johannes Stezenbach <js at linuxtv.org>
date:        Mon Feb  6 17:35:22 2006 -0600
summary:     display revision numbers

..and see that you've got one branch in your tree, descended from something tagged 0.8.

And you can check out that head with:

$ hg co -b 0.8
Using head c2755eba8631 for branch 0.8

MultipleHeads (last edited 2012-11-06 15:19:08 by abuehl)