effectflag: activate effect flag on test-amend.t test file
Prepare activation of effect flag by default by activating it on test- amend.t
test file first.
==============TopicTutorial==============..Thistestfileisalsosupposedtobeabletocompileasarestfile...SomeSetup::$."$TESTDIR/testlib/topic_setup.sh"$hginitserver$cdserver$cat>>.hg/hgrc<<EOF>[ui]>user=ShoppingMaster>EOF$cat>>shopping<<EOF>Spam>Whizzobutter>Albatross>Rat(ratheralot)>Juggedfish>Blancmange>Salmonmousse>EOF$hgcommit-A-m"Shopping list"addingshopping$cd..$hgcloneserverclientupdatingtobranchdefault1filesupdated,0filesmerged,0filesremoved,0filesunresolved$cdclient$cat>>.hg/hgrc<<EOF>[ui]>user=TutorialUser>EOFTopicbranchesarelightweightbrancheswhichdisappearwhenchangesarefinalized(movetothepublicphase).Theycanhelpuserstoorganiseandsharetheirunfinishedwork.TopicBasics============Let's says we use Mercurial to manage our shopping list:: $ hg log --graph @ changeset: 0:38da43f0a2ea tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Shopping listWe are about to do some edition to this list and would like to do them withina topic. Creating a new topic is done using the ``topic`` command:: $ hg topic foodAs for named branch, our topic is active but it does not contains any changesets yet:: $ hg topic * food $ hg summary parent: 0:38da43f0a2ea tip Shopping list branch: default commit: (clean) update: (current) topic: food $ hg log --graph @ changeset: 0:38da43f0a2ea tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Shopping listOur next commit will be part of the active topic:: $ cat >> shopping <<EOF>Egg>Suggar>Vinegar>Oil>EOF$hgcommit-m"adding condiments"$hglog--graph--rev'topic("food")'@changeset:1:13900241408b|tag:tip~topic:fooduser:testdate:ThuJan0100:00:001970+0000summary:addingcondimentsAndfuturecommitwillbepartofthattopictoo::$cat>> shopping <<EOF>Bananas>Pear>Apple>EOF$hgcommit-m"adding fruits"$hglog--graph--rev'topic("food")'@changeset:2:287de11b401f|tag:tip|topic:food|user:test|date:ThuJan0100:00:001970+0000|summary:addingfruits|ochangeset:1:13900241408b|topic:food~user:testdate:ThuJan0100:00:001970+0000summary:addingcondimentsWecangetacompactviewofthecontentofourtopicusingthe``stack``command::$hgstack ### topic: food ### branch: defaultt2@addingfruits(current)t1:addingcondiments^ShoppinglistThetopicdesactivatewhenweupdateawayfromit::$hgupdefault1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgtopicfoodNotethat``default``(nameofthebranch)nowreferstothetipmostchangesetofdefaultwithoutatopic::$hglog--graphochangeset:2:287de11b401f|tag:tip|topic:food|user:test|date:ThuJan0100:00:001970+0000|summary:addingfruits|ochangeset:1:13900241408b|topic:food|user:test|date:ThuJan0100:00:001970+0000|summary:addingcondiments|@changeset:0:38da43f0a2eauser:testdate:ThuJan0100:00:001970+0000summary:ShoppinglistAndupdatingbacktothetopicreactivateit::$hgupfoodswitchingtotopicfood1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgtopic*foodThenameusedforupdatingdoesnotaffecttheactivationofthetopic,updatingtoarevisionpartofatopicwillactivateitinallcases::$hgupdefault1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgup--rev'desc("condiments")'switchingtotopicfood1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgtopic*food..serversideactivity::$cd../server/$cat>shopping<<EOF>T-Shirt>Trousers>Spam>Whizzobutter>Albatross>Rat(ratheralot)>Juggedfish>Blancmange>Salmonmousse>EOF$hgcommit-A-m"Adding clothes"$cd../clientTopicwillalsoaffectrebaseandmergedestination.Let's pull the latest update from the main server:: $ hg pull pulling from $TESTTMP/server (glob) 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) $ hg log -G o changeset: 3:6104862e8b84 | tag: tip | parent: 0:38da43f0a2ea | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: Adding clothes | | o changeset: 2:287de11b401f | | topic: food | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | summary: adding fruits | | | @ changeset: 1:13900241408b |/ topic: food | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: adding condiments | o changeset: 0:38da43f0a2ea user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Shopping listThe topic head will not be considered when merge from the new head of the branch:: $ hg up default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg merge abort: branch 'default' has one head - please merge with an explicit rev (run 'hgheads' to see all heads) [255]But the topic will see that branch head as a valid destination:: $ hg up food switching to topic food 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg rebase rebasing 1:13900241408b "adding condiments" merging shopping rebasing 2:287de11b401f "adding fruits" merging shopping $ hg log --graph @ changeset: 5:2d50db8b5b4c | tag: tip | topic: food | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: adding fruits | o changeset: 4:4011b46eeb33 | topic: food | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: adding condiments | o changeset: 3:6104862e8b84 | parent: 0:38da43f0a2ea | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: Adding clothes | o changeset: 0:38da43f0a2ea user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Shopping listThe topic information will fade out when we publish the changesets:: $ hg topic food $ hg push pushing to $TESTTMP/server (glob) searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 1 files 2 new obsolescence markers $ hg topic $ hg log --graph @ changeset: 5:2d50db8b5b4c | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: adding fruits | o changeset: 4:4011b46eeb33 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: adding condiments | o changeset: 3:6104862e8b84 | parent: 0:38da43f0a2ea | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: Adding clothes | o changeset: 0:38da43f0a2ea user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Shopping list $ hg up default 0 files updated, 0 files merged, 0 files removed, 0 files unresolvedWorking with Multiple Topics============================In the above example, topic are not bring much benefit since you only have oneline of developement. Topic start to be more useful when you have to work onmultiple features are the same time.We might go shopping in a hardware store in the same go, so let'saddsometoolstotheshoppinglistwithinganewtopic::$hgtopictools$echohammer>> shopping $ hg ci -m 'Addinghammer' $ echo saw >> shopping $ hg ci -m 'Addingsaw' $ echo drill >> shopping $ hg ci -m 'Addingdrill'But are not sure to actually go in the hardward store, so in the meantime, wewant to extend the list with drinks. We go back to the official default branchand start a new topic:: $ hg up default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg topic drinks $ echo 'applejuice' >> shopping $ hg ci -m 'Addingapplejuice' $ echo 'orangejuice' >> shopping $ hg ci -m 'Addingorangejuice'We now have two topics:: $ hg topic * drinks toolsThe information ``hg stack`` command adapt to the active topic:: $ hg stack ### topic: drinks ### branch: default t2@ Adding orange juice (current) t1: Adding apple juice ^ adding fruits $ hg up tools switching to topic tools 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg stack ### topic: tools ### branch: default t3@ Adding drill (current) t2: Adding saw t1: Adding hammer ^ adding fruitsThey are seen as independant branch by Mercurial. No rebase or merge betwen them will be attempted by default:: $ hg rebase nothing to rebase [1].. server activity:: $ cd ../server $ hg up 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ mv shopping foo $ echo 'Coat' > shopping $ cat foo >> shopping $ hg ci -m 'addacoat' $ echo 'Coat' > shopping $ echo 'Shoes' >> shopping $ cat foo >> shopping $ hg rm foo not removing foo: file is untracked [1] $ hg ci -m 'addapairofshoes' $ cd ../clientLets see what other people did in the mean time:: $ hg pull pulling from $TESTTMP/server (glob) searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 1 files (+1 heads) (run 'hgheads' to see heads)There is new changes! We can simply use ``hg rebase`` to update our changeset on top of the latest:: $ hg rebase rebasing 6:183984ef46d1 "Adding hammer" merging shopping rebasing 7:cffff85af537 "Adding saw" merging shopping rebasing 8:34255b455dac "Adding drill" merging shoppingBut what about the other topic? You can use 'hgtopic--verbose' to see information about them:: $ hg topic --verbose drinks (on branch: default, 2 changesets, 2 behind) tools (on branch: default, 3 changesets)The "2 behind" is telling you that there is 2 new changesets on the named branch of the topic. You need to merge or rebase to incorporate them.Pushing that topic would create a new heads will be prevented:: $ hg push --rev drinks pushing to $TESTTMP/server (glob) searching for changes abort: push creates new remote head 70dfa201ed73! (merge or see 'hghelppush' for details about pushing new heads) [255]Even after a rebase Pushing all active topics at the same time will complains about the multiple heads it would create on that branch:: $ hg rebase -b drinks rebasing 9:8dfa45bd5e0c "Adding apple juice" merging shopping rebasing 10:70dfa201ed73 "Adding orange juice" merging shopping switching to topic tools $ hg push pushing to $TESTTMP/server (glob) searching for changes abort: push creates new remote head 4cd7c1591a67! (merge or see 'hghelppush' for details about pushing new heads) [255]Publishing only one of them is allowed (as long as it does not create a new branch head has we just saw in the previous case):: $ hg push -r drinks pushing to $TESTTMP/server (glob) searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 1 files 2 new obsolescence markersThe publishing topic has now vanished, and the one still draft is now marked as "behind":: $ hg topic --verbose * tools (on branch: default, 3 changesets, 2 behind) $ hg stack ### topic: tools ### branch: default, 2 behind t3@ Adding drill (current) t2: Adding saw t1: Adding hammer ^ add a pair of shoes