tests: add debugobsolete calls before many obslog calls
As requested by Pierre-Yves. The main reason is to catch superfluous
creation of obsmarkers, as well as any future changes to how the
obsmarkers get created.
+====================================================+Teststheresolutionofcontentdivergence:metadata+====================================================Thisfileintendtocovercasesfocusedaroundmetadatamerging.Setup-----$cat>>$HGRCPATH<<EOF>[alias]>glog=log-GT"{rev}:{node|short}{desc|firstline}\n{phase}{instabilities}\n\n">[phases]>publish=False>[experimental]>evolution.allowdivergence=True>[extensions]>rebase=>strip=>EOF$echo"evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/">>$HGRCPATHCheckwepreservetheauthorproperly-------------------------------------Testingissue6113tomakesurethatcontent-divergenceresolutiondon'treplace initial author with the user running the resolution command: $ hg init userfoo $ cd userfoo $ unset HGUSER $ echo "[ui]" >> ./.hg/hgrc $ echo "username = foo <foo@test.com>" >> ./.hg/hgrc $ for ch in a b c; do > echo $ch > $ch; > hg add $ch; > hg ci -m "added "$ch; > done; $ cd .. $ hg init userbar $ cd userbar $ unset HGUSER $ echo "[ui]" >> ./.hg/hgrc $ echo "username = bar <bar@test.com>" >> ./.hg/hgrc $ hg pull ./../userfoo -q $ cd ../userfoo $ hg up -r "desc('addedb')" 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo c > c $ echo e > e $ hg add c e $ hg ci -m "added c e" created new head $ hg up -r "desc('addedb')" 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ echo cc > c $ hg add c $ hg ci -m "added c" created new head $ hg prune -r "min(desc('addedc'))" -s "desc('addedce')" 1 changesets pruned $ hg prune -r "min(desc('addedc'))" -s "max(desc('addedc'))" --hidden 1 changesets pruned 2 new content-divergent changesets $ hg glog @ 4:6c06cda6dc99 added c | draft content-divergent | | * 3:0c9267e23c9d added c e |/ draft content-divergent | o 1:1740ad2a1eda added b | draft | o 0:f863f39764c4 added a draft $ cd ../userbar $ hg pull ./../userfoo -q 2 new content-divergent changesets $ hg evolve --content-divergent --any merge:[3] added c e with: [4] added c base: [2] added c 1 files updated, 0 files merged, 0 files removed, 0 files unresolvedMake sure resultant cset don'treplacetheinitialuserwithuserrunningthecommand:$hglog-rtipchangeset:5:443bd2972210tag:tipparent:1:1740ad2a1edauser:foo<foo@test.com>date:ThuJan0100:00:001970+0000summary:addedce$cd..Testingthethreewaymergelogicforuserofcontentdivergentchangesets--------------------------------------------------------------------------$hginitmergeusers$cdmergeusers$forchinabc;do>touch$ch>hgadd$ch>hgci-m"added "$ch>done;$hgamend-m"updated c"$hgup-r'desc("added c")'--hidden-qupdatedtohiddenchangeset2b3c31fe982d(hiddenrevision'2b3c31fe982d'wasrewrittenas:464e35020fd0)workingdirectoryparentisobsolete!(2b3c31fe982d)$echococo>c1)whenoneuserisdifferentwrtbase--------------------------------------Insertadivergingauthorname:$hgamend-u'foouser'2newcontent-divergentchangesetsRunautomaticevolution:$hgevolve--content-divergentmerge:[3]updatedcwith:[4]addedcbase:[2]addedc1filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryisnowat932d6ceb7672$hglog-rtip|grep"^user"user:foouser$hgstrip.-q--configextensions.strip=2newcontent-divergentchangesets2)whenboththeuseraredifferentwrtbase--------------------------------------------$hgup-r'max(desc("updated c"))'1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgamend-u'baruser'Runautomaticevolution:$hgevolve--content-divergentmerge:[4]addedcwith:[5]updatedcbase:[2]addedc0filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryisnowat202a770d8c1f$hglog-rtip|grep"^user"user:baruser,foouser$cd..Testthecontent-divergenceresolutioninvolvingdateupdate------------------------------------------------------------$hginitdivergingdate$cddivergingdate$unsetHGUSER$echo"[ui]">>./.hg/hgrc$echo"username = test">>./.hg/hgrc$echohi>r0$hgci-qAm'add r0'$echohi>foo.txt$hgci-qAm'add foo.txt'$hgmetaedit-r.-d'0 2'0filesupdated,0filesmerged,0filesremoved,0filesunresolveddate:updatedonbothsidetothesamevalue$echohi>bar.txt$hgadd-qbar.txt$hgamend-q$hgmetaedit-r1-d'0 1'--hidden2newcontent-divergentchangesets$hglog-G*changeset:4:c17bf400a278|tag:tip|parent:0:a24ed8ad918c|user:test|date:WedDec3123:59:591969-0000|instability:content-divergent|summary:addfoo.txt||@changeset:3:a25dd7af6cf6|/parent:0:a24ed8ad918c|user:test|date:WedDec3123:59:581969-0000|instability:content-divergent|summary:addfoo.txt|ochangeset:0:a24ed8ad918cuser:testdate:ThuJan0100:00:001970+0000summary:addr0$hgevolve--list--rev.a25dd7af6cf6:addfoo.txtcontent-divergent:c17bf400a278(draft)(precursorcc71ffbc7c00)$hglog--hidden-rcc71ffbc7c00-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'1cc71ffbc7c001970-01-0100:00+0000:date-changedusingmetaeditas4:c17bf400a278;date-changedusingmetaeditas2:0065551bd38f$hglog-r'desc("add foo.txt")'-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'3a25dd7af6cf61969-12-3123:59-0000:4c17bf400a2781969-12-3123:59-0000:$hgevolve--content-divergentmerge:[3]addfoo.txtwith:[4]addfoo.txtbase:[1]addfoo.txt0filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryisnowat6c144bb30333$hglog-r'desc("add foo.txt")'-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'56c144bb303331969-12-3123:59-0000:date:updatedoneonesidetoanoldervalue$hgstrip.0filesupdated,0filesmerged,2filesremoved,0filesunresolvedsavedbackupbundleto$TESTTMP/divergingdate/.hg/strip-backup/6c144bb30333-72e26b88-backup.hg2newcontent-divergentchangesets$hguptip1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgamend--date"0 3"$hglog-G@changeset:5:6189a9adfff0|tag:tip|parent:0:a24ed8ad918c|user:test|date:WedDec3123:59:571969-0000|instability:content-divergent|summary:addfoo.txt||*changeset:3:a25dd7af6cf6|/parent:0:a24ed8ad918c|user:test|date:WedDec3123:59:581969-0000|instability:content-divergent|summary:addfoo.txt|ochangeset:0:a24ed8ad918cuser:testdate:ThuJan0100:00:001970+0000summary:addr0$hgevolve--list-r.6189a9adfff0:addfoo.txtcontent-divergent:a25dd7af6cf6(draft)(precursorcc71ffbc7c00)$hglog-rcc71ffbc7c00+6189a9adfff0+a25dd7af6cf6--hidden-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'1cc71ffbc7c001970-01-0100:00+0000:date-changedusingmetaeditas4:c17bf400a278;date-changedusingmetaeditas2:0065551bd38f56189a9adfff01969-12-3123:59-0000:3a25dd7af6cf61969-12-3123:59-0000:$hgevolve--content-divergentmerge:[3]addfoo.txtwith:[5]addfoo.txtbase:[1]addfoo.txt0filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryisnowat806d0024c04d$hglog-r.--hidden-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'6806d0024c04d1969-12-3123:59-0000:date:updatedonesidetoannewervalue$hgstrip.0filesupdated,0filesmerged,2filesremoved,0filesunresolvedsavedbackupbundleto$TESTTMP/divergingdate/.hg/strip-backup/806d0024c04d-24cb28ad-backup.hg2newcontent-divergentchangesets$hgupdatea25dd7af6cf6--hidden2filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgamend--date"120 0"$hglog-G@changeset:6:5199d0bc13d4|tag:tip|parent:0:a24ed8ad918c|user:test|date:ThuJan0100:02:001970+0000|instability:content-divergent|summary:addfoo.txt||*changeset:5:6189a9adfff0|/parent:0:a24ed8ad918c|user:test|date:WedDec3123:59:571969-0000|instability:content-divergent|summary:addfoo.txt|ochangeset:0:a24ed8ad918cuser:testdate:ThuJan0100:00:001970+0000summary:addr0$hgevolve--list-r.5199d0bc13d4:addfoo.txtcontent-divergent:6189a9adfff0(draft)(precursorcc71ffbc7c00)$hgup6189a9adfff00filesupdated,0filesmerged,1filesremoved,0filesunresolved$hglog-rcc71ffbc7c00+6189a9adfff0+5199d0bc13d4--hidden-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'1cc71ffbc7c001970-01-0100:00+0000:date-changedusingmetaeditas4:c17bf400a278;date-changedusingmetaeditas2:0065551bd38f56189a9adfff01969-12-3123:59-0000:65199d0bc13d41970-01-0100:02+0000:$hgevolve--content-divergentmerge:[5]addfoo.txtwith:[6]addfoo.txtbase:[1]addfoo.txt1filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryisnowat51e08ac59670$hglog-r.--hidden-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'751e08ac596701970-01-0100:02+0000:date:updatedeachsidetoadifferentvalue,newershouldwin$hgstrip.0filesupdated,0filesmerged,2filesremoved,0filesunresolvedsavedbackupbundleto$TESTTMP/divergingdate/.hg/strip-backup/51e08ac59670-d8a3c2ca-backup.hg2newcontent-divergentchangesets$hguptip2filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgamend--date"235 0"$hgupdate6189a9adfff0--hidden0filesupdated,0filesmerged,1filesremoved,0filesunresolved$hgamend--date"784 0"$hglog-G@changeset:8:75254fb3164b|tag:tip|parent:0:a24ed8ad918c|user:test|date:ThuJan0100:13:041970+0000|instability:content-divergent|summary:addfoo.txt||*changeset:7:5421a7efcc6e|/parent:0:a24ed8ad918c|user:test|date:ThuJan0100:03:551970+0000|instability:content-divergent|summary:addfoo.txt|ochangeset:0:a24ed8ad918cuser:testdate:ThuJan0100:00:001970+0000summary:addr0$hgevolve--list-r.75254fb3164b:addfoo.txtcontent-divergent:5421a7efcc6e(draft)(precursorcc71ffbc7c00)$hglog-r6189a9adfff0+5421a7efcc6e+75254fb3164b--hidden-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'56189a9adfff01969-12-3123:59-0000:date-changedusingamendas8:75254fb3164b75421a7efcc6e1970-01-0100:03+0000:875254fb3164b1970-01-0100:13+0000:$hgevolve--content-divergentmerge:[7]addfoo.txtwith:[8]addfoo.txtbase:[1]addfoo.txt0filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryisnowatab7c0a425dc9$hglog-r.--hidden-T'{rev}{node|short}{date|isodate}: {join(obsfate, "; ")}\n'9ab7c0a425dc91970-01-0100:13+0000:$cd..