tutorial: fix grammar, spelling, punctuation
I restrained myself to making only changes that turn bad English into
good English. There are still opportunities to improve the tutorial,
but other changes require some discussion and review. This change
should be uncontroversial.
The same changes had to be duplicated in both copies of the tutorial
(hmmm); it's not clear which one is definitive.
Initialsetup-------------ThisMercurialconfigurationexampleisusedfortesting...Varioussetup$cat>>$HGRCPATH<<EOF>[ui]>logtemplate="{node|short} ({phase}): {desc}\n">[diff]>git=1>[alias]>#"-d '0 0'"meansthatthenewcommitwillbeatJanuary1st1970.>#Thisisusedforstablehashduringtest>amend=amend-d'0 0'>[extensions]>hgext.graphlog=>EOF$hginitlocal$cat>>local/.hg/hgrc<<EOF>[paths]>remote=../remote>other=../other>[ui]>user=BabartheKing>EOF$hginitremote$cat>>remote/.hg/hgrc<<EOF>[paths]>local=../local>[ui]>user=CelestinetheQueen>EOF$hginitother$cat>>other/.hg/hgrc<<EOF>[ui]>user=PrincessFlore>EOFThistutorialusesthefollowingconfigurationforMercurial:Acompactlogtemplatewithphasedata:$hgshowconfiguiui.slash=Trueui.logtemplate="{node|short} ({phase}): {desc}\n"Improvedgitformatdiff:$hgshowconfigdiffdiff.git=1Andthegraphlogextension$hgshowconfigextensionsextensions.hgext.graphlog=Andofcourse,weanabledtheexperimentalextensionsformutablehistory:$$(dirname$TESTDIR)/enable.sh>>$HGRCPATH2>/dev/null-----------------------SingleDeveloperUsage-----------------------Thistutorialshowshowtouseevolutiontorewritehistorylocally.Fixingmistakewith`hgamend`--------------------------------Weareversionningashoppinglist$cdlocal$cat>>shopping<<EOF>Spam>Whizzobutter>Albatross>Rat(ratheralot)>Juggedfish>Blancmange>Salmonmousse>EOF$hgcommit-A-m"Monthy Python Shopping list"addingshoppingItsfirstversionissharedwiththeoutside.$hgpushremotepushingto$TESTTMP/remotesearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1filesLaterIaddadditionalitemtomylist$cat>>shopping<<EOF>Egg>Suggar>Vinegar>Oil>EOF$hgcommit-m"adding condiment"$cat>>shopping<<EOF>Bananos>Pear>Apple>EOF$hgcommit-m"adding fruit"Thishistoryisverylinear$hgglog@d85de4546133(draft):addingfruit|o4d5dc8187023(draft):addingcondiment|o7e82d3f3c2cb(public):MonthyPythonShoppinglistButatypowasmadeinBabanas!$hgexporttip # HG changeset patch # User test # Date 0 0 # Node ID d85de4546133030c82d257bbcdd9b1b416d0c31c # Parent 4d5dc81870237d492284826e21840b2ca00e26d1addingfruitdiff--gita/shoppingb/shopping---a/shopping+++b/shopping@@-9,3+9,6@@SuggarVinegarOil+Bananos+Pear+AppleThefaultychangesetisinthe"draft"phasebecauseithasnotbeenexchangedwiththeoutside.Thefirstonehasbeenexchangedandis"public"(immutable).$hgglog@d85de4546133(draft):addingfruit|o4d5dc8187023(draft):addingcondiment|o7e82d3f3c2cb(public):MonthyPythonShoppinglisthopefully.Icanusehgamendtorewritemyfaultychangeset!$sed-i''-es/Bananos/Banana/shopping$hgdiffdiff--gita/shoppingb/shopping---a/shopping+++b/shopping@@-9,6+9,6@@SuggarVinegarOil-Bananos+BananaPearApple$hgamendAnewchangesetwiththerightdiffreplacethewrongone.$hgglog@0cacb48f4482(draft):addingfruit|o4d5dc8187023(draft):addingcondiment|o7e82d3f3c2cb(public):MonthyPythonShoppinglist$hgexporttip # HG changeset patch # User test # Date 0 0 # Node ID 0cacb48f44828d2fd31c4e45e18fde32a5b2f07b # Parent 4d5dc81870237d492284826e21840b2ca00e26d1addingfruitdiff--gita/shoppingb/shopping---a/shopping+++b/shopping@@-9,3+9,6@@SuggarVinegarOil+Banana+Pear+AppleGettingridofbranchyhistory----------------------------------WhileIwasworkingonmylist.someonehelpmadeachangeremotly.$cd../remote$hgup-q$sed-i''-e's/Spam/Spam Spam Spam/'shopping$hgci-m'SPAM'$cd../localI'll get this remote changeset when pulling $ hg pull remote pulling from $TESTTMP/remote searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) (run 'hgheads.' to see heads, 'hgmerge' to merge)I now have a new heads. Note that this remote head is immutable $ hg log -G o 9ca060c80d74 (public): SPAM | | @ 0cacb48f4482 (draft): adding fruit | | | o 4d5dc8187023 (draft): adding condiment |/ o 7e82d3f3c2cb (public): Monthy Python Shopping listinstead of merging my head with the new one. I'mgoingtorebasemywork$hgdiff$hgrebase-d9ca060c80d74-s4d5dc8187023mergingshoppingmergingshoppingMylocalworkisnowrebasedontheremoteone.$hglog-G@387187ad9bd9(draft):addingfruit|odfd3a2d7691e(draft):addingcondiment|o9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglistRemovingchangesets------------------------Iaddnewitemtomylist$cat>>shopping<<EOF>car>bus>plane>boat>EOF$hgci-m'transport'$hglog-G@d58c77aa15d7(draft):transport|o387187ad9bd9(draft):addingfruit|odfd3a2d7691e(draft):addingcondiment|o9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglistIhaveanewcommitbutIrealizethatdon't want it. (transport shop list doesnot fit well in my standard shopping list) $ hg prune . # . is for working directory parent 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory now at 387187ad9bd9The silly changeset is gone. $ hg log -G @ 387187ad9bd9 (draft): adding fruit | o dfd3a2d7691e (draft): adding condiment | o 9ca060c80d74 (public): SPAM | o 7e82d3f3c2cb (public): Monthy Python Shopping listReordering changesets------------------------We create two changesets. $ cat >> shopping <<EOF>Shampoo>Toothbrush>...Morebathroomstufftocome>Towel>Soap>EOF$hgci-m'bathroom stuff'-q#XXXremovethe-q$sed-i''-e's/Spam/Spam Spam Spam/g'shopping$hgci-m'SPAM SPAM'$hglog-G@c48f32fb1787(draft):SPAMSPAM|o8d39a843582d(draft):bathroomstuff|o387187ad9bd9(draft):addingfruit|odfd3a2d7691e(draft):addingcondiment|o9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglist..note:don't amend changeset 7e82d3f3c2cb or 9ca060c80d74 as they are immutable.I now want to push to remote all my changes except the bathroom one, which I'mnottotallyhappywithyet.Tobeabletopush"SPAM SPAM"Ineedaversionof"SPAM SPAM"whichisnotachildof"bathroom stuff"Youcanuse'rebase -r'or'graft -O'forthat:$hgup'p1(8d39a843582d)'#goingon"bathroom stuff"parent1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hggraft-Oc48f32fb1787#moving"SPAM SPAM"totheworkingdirectoryparentgraftingrevision10mergingshopping$hglog-G@a2fccc2e7b08(draft):SPAMSPAM||o8d39a843582d(draft):bathroomstuff|/o387187ad9bd9(draft):addingfruit|odfd3a2d7691e(draft):addingcondiment|o9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglistWehaveanewSPAMSPAMversionwithoutthebathroomstuff$grepSpamshopping#enoughspamSpamSpamSpamSpamSpamSpamSpamSpamSpam$grepToothbrushshopping#noToothbrush[1]$hgexport. # HG changeset patch # User test # Date 0 0 # Node ID a2fccc2e7b08bbce6af7255b989453f7089e4cf0 # Parent 387187ad9bd9d8f9a00a9fa804a26231db547429SPAMSPAMdiff--gita/shoppingb/shopping---a/shopping+++b/shopping@@-1,4+1,4@@-SpamSpamSpam+SpamSpamSpamSpamSpamSpamSpamSpamSpamWhizzobutterAlbatrossRat(ratheralot)TomakesureIdonotpushunreadychangesetbymistakeIsetthe"bathroomstuff"changesetinthesecretphase.$hgphase--force--secret8d39a843582dwecannowpushourchange:$hgpushremotepushingto$TESTTMP/remotesearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded3changesetswith3changesto1filesforsimplicityshakewegetthebathroomchangeinlineagain$hgrebase-r8d39a843582d-da2fccc2e7b08mergingshopping$hgphase--draft.$hglog-G@8a79ae8b029e(draft):bathroomstuff|oa2fccc2e7b08(public):SPAMSPAM|o387187ad9bd9(public):addingfruit|odfd3a2d7691e(public):addingcondiment|o9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglistSplittingchange------------------Tobedone(currentlyachievewith"two commit + debugobsolete")Collapsingchange------------------Tobedone(currentlyachievewith"revert + debugobsolete"or"rebase --collapse")-----------------------Collaboration-----------------------sharingmutablechangeset----------------------------Tosharemutablechangesetwithothers,justcheckthattherepoyouinteractwithis"not publishing".Otherwiseyouwillgetthepreviouslyobservebehaviorwhereexchangedchangesetareautomaticallypublished.$cd../remote$hg-R../local/showconfigphasesthelocalrepodoesnothaveanyspecificconfigurationfor`phases.publish`.Itis``true``bydefault.$hgpulllocalpullingfrom$TESTTMP/localsearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files(run'hg update'togetaworkingcopy)$hglog-Go8a79ae8b029e(public):bathroomstuff|oa2fccc2e7b08(public):SPAMSPAM|o387187ad9bd9(public):addingfruit|odfd3a2d7691e(public):addingcondiment|@9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglistWedonotwanttopublishthe"bathroom changeset".Let's rollback the last transaction $ hg rollback repository tip rolled back to revision 4 (undo pull) $ hg log -G o a2fccc2e7b08 (public): SPAM SPAM | o 387187ad9bd9 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @ 9ca060c80d74 (public): SPAM | o 7e82d3f3c2cb (public): Monthy Python Shopping listLet'smakethelocalrepo"non publishing"$echo'[phases]'>> ../local/.hg/hgrc $ echo 'publish=false' >> ../local/.hg/hgrc $ echo '[phases]' >> .hg/hgrc $ echo 'publish=false' >> .hg/hgrc $ hg showconfig phases phases.publish=false $ hg -R ../local/ showconfig phases phases.publish=falseI can now exchange mutable changeset between "remote" and "local" repository. $ hg pull local pulling from $TESTTMP/local searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (run 'hgupdate' to get a working copy) $ hg log -G o 8a79ae8b029e (draft): bathroom stuff | o a2fccc2e7b08 (public): SPAM SPAM | o 387187ad9bd9 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @ 9ca060c80d74 (public): SPAM | o 7e82d3f3c2cb (public): Monthy Python Shopping listRebasing unstable change after pull----------------------------------------------Remotely someone add a new changeset on top of the mutable "bathroom" on. $ hg up 8a79ae8b029e -q $ cat >> shopping <<EOF>Giraffe>Rhino>Lion>Bear>EOF$hgci-m'animals'Butatthesametime,locally,thissame"bathroom changeset"wasupdated.$cd../local$hgup8a79ae8b029e-q$sed-i''-e's/... More bathroom stuff to come/Bath Robe/'shopping$hgamend$hglog-G@ffa278c50818(draft):bathroomstuff|oa2fccc2e7b08(public):SPAMSPAM|o387187ad9bd9(public):addingfruit|odfd3a2d7691e(public):addingcondiment|o9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglistWhenwepullfromremoteagainwegetanunstablestate!$hgpullremotepullingfrom$TESTTMP/remotesearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files(+1heads)(run'hg heads .'toseeheads,'hg merge'tomerge)1newunstableschangesetsThenewchangeset"animal"isbasedonanoldchangesetof"bathroom".Youcanseebothversionshowingupinthelog.$hglog-Go9ac5d0e790a2(draft):animals||@ffa278c50818(draft):bathroomstuff||x|8a79ae8b029e(draft):bathroomstuff|/oa2fccc2e7b08(public):SPAMSPAM|o387187ad9bd9(public):addingfruit|odfd3a2d7691e(public):addingcondiment|o9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglistTheolderversion8a79ae8b029eneverceasedtoexistinthelocalrepo.Itwasjusthiddenandexcludedfrompullandpush...note::Inhgviewthereisanicedottedrelationhighlightingffa278c50818asanewversionof8a79ae8b029e.Thisisnotyetportedto``hglog-G``.Thereisnowan**unstable**changesetinthishistory.Mercurialwillrefusetoshareitwiththeoutside:$hgpushotherpushingto$TESTTMP/othersearchingforchangesabort:pushincludesanunstablechangeset:9ac5d0e790a2!(use'hg stabilize'togetastablehistoryor--forcetoignorewarnings)[255]Toresolvethisunstablestate,youneedtorebase9ac5d0e790a2ontoffa278c50818.The"hg stabilize"commandwilldothisforyou.Ithasa--dry-runoptiontoonlysuggestthenextmove.$hgstabilize--dry-runmove:[15]animalsatop:[14]bathroomstuffhgrebase-r9ac5d0e790a2-dffa278c50818Let's do it $ hg rebase -r 9ac5d0e790a2 -d ffa278c50818 merging shoppingThe old version of bathroom is hidden again. $ hg log -G @ 437efbcaf700 (draft): animals | o ffa278c50818 (draft): bathroom stuff | o a2fccc2e7b08 (public): SPAM SPAM | o 387187ad9bd9 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | o 9ca060c80d74 (public): SPAM | o 7e82d3f3c2cb (public): Monthy Python Shopping listWe can push this evolution to remote $ hg push remote pushing to $TESTTMP/remote searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 1 files (+1 heads)remote get a warning that current working directory is based on an obsolete changeset $ cd ../remote $ hg pull local # we up again to trigger the warning. it was displayed during the push pulling from $TESTTMP/local searching for changes no changes found Working directory parent is obsolete $ hg up 437efbcaf700 1 files updated, 0 files merged, 0 files removed, 0 files unresolvedRelocating unstable change after prune----------------------------------------------The remote guy keep working $ sed -i'' -e 's/Spam/SpamSpamSpamSpam/g' shopping $ hg commit -m "SPAM SPAM SPAM"I'mpullingitsworklocally.$cd../local$hgpullremotepullingfrom$TESTTMP/remotesearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files(run'hg update'togetaworkingcopy)$hglog-Goae45c0c3092a(draft):SPAMSPAMSPAM|@437efbcaf700(draft):animals|offa278c50818(draft):bathroomstuff|oa2fccc2e7b08(public):SPAMSPAM|o387187ad9bd9(public):addingfruit|odfd3a2d7691e(public):addingcondiment|o9ca060c80d74(public):SPAM|o7e82d3f3c2cb(public):MonthyPythonShoppinglistInthemeantimeInoticedyoucan't buy animals in a super market and I prune the animal changeset: $ hg prune 437efbcaf700 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory now at ffa278c50818 1 new unstables changesetsThe animals changeset is still displayed because the "SPAM SPAM SPAM" changesetis neither dead or obsolete. My repository is in an unstable state again. $ hg log -G o ae45c0c3092a (draft): SPAM SPAM SPAM | x 437efbcaf700 (draft): animals | @ ffa278c50818 (draft): bathroom stuff | o a2fccc2e7b08 (public): SPAM SPAM | o 387187ad9bd9 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | o 9ca060c80d74 (public): SPAM | o 7e82d3f3c2cb (public): Monthy Python Shopping list $ hg log -r 'unstable()' ae45c0c3092a (draft): SPAM SPAM SPAM# XXX make prune stabilization works# $ hg stabilize --any# merging shopping $ hg graft -O ae45c0c3092a grafting revision 17 merging shopping $ hg log -G @ 20de1fb1cec5 (draft): SPAM SPAM SPAM | o ffa278c50818 (draft): bathroom stuff | o a2fccc2e7b08 (public): SPAM SPAM | o 387187ad9bd9 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | o 9ca060c80d74 (public): SPAM | o 7e82d3f3c2cb (public): Monthy Python Shopping listHandling Conflicting amend----------------------------------------------We can detect that multiple diverging/conflicting amendments have been made. Therewill be a "evol-merge" command to merge conflicting amendments.This command is not ready yet.