tests/test-obsolete.t
branchstable
changeset 24803 e89f909edffa
parent 24733 c00e4338fa4b
child 24882 995003a324da
equal deleted inserted replaced
24753:612ed41ae359 24803:e89f909edffa
     9   >    echo "$1" > "$1"
     9   >    echo "$1" > "$1"
    10   >    hg add "$1"
    10   >    hg add "$1"
    11   >    hg ci -m "add $1"
    11   >    hg ci -m "add $1"
    12   > }
    12   > }
    13   $ getid() {
    13   $ getid() {
    14   >    hg id --debug --hidden -ir "desc('$1')"
    14   >    hg log -T "{node}\n" --hidden -r "desc('$1')"
    15   > }
    15   > }
    16 
    16 
    17   $ cat > debugkeys.py <<EOF
    17   $ cat > debugkeys.py <<EOF
    18   > def reposetup(ui, repo):
    18   > def reposetup(ui, repo):
    19   >     class debugkeysrepo(repo.__class__):
    19   >     class debugkeysrepo(repo.__class__):
   185   abort: hidden revision '4'!
   185   abort: hidden revision '4'!
   186   (use --hidden to access hidden revisions)
   186   (use --hidden to access hidden revisions)
   187   [255]
   187   [255]
   188   $ hg debugrevspec 'rev(6)'
   188   $ hg debugrevspec 'rev(6)'
   189   $ hg debugrevspec 'rev(4)'
   189   $ hg debugrevspec 'rev(4)'
       
   190   $ hg debugrevspec 'null'
       
   191   -1
   190 
   192 
   191 Check that public changeset are not accounted as obsolete:
   193 Check that public changeset are not accounted as obsolete:
   192 
   194 
   193   $ hg --hidden phase --public 2
   195   $ hg --hidden phase --public 2
   194   $ hg log -G
   196   $ hg log -G
   246   o  1:7c3bad9141dc (public) [ ] add b
   248   o  1:7c3bad9141dc (public) [ ] add b
   247   |
   249   |
   248   o  0:1f0dee641bb7 (public) [ ] add a
   250   o  0:1f0dee641bb7 (public) [ ] add a
   249   
   251   
   250 
   252 
       
   253   $ cd ..
       
   254 
       
   255 Revision 0 is hidden
       
   256 --------------------
       
   257 
       
   258   $ hg init rev0hidden
       
   259   $ cd rev0hidden
       
   260 
       
   261   $ mkcommit kill0
       
   262   $ hg up -q null
       
   263   $ hg debugobsolete `getid kill0`
       
   264   $ mkcommit a
       
   265   $ mkcommit b
       
   266 
       
   267 Should pick the first visible revision as "repo" node
       
   268 
       
   269   $ hg archive ../archive-null
       
   270   $ cat ../archive-null/.hg_archival.txt
       
   271   repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
       
   272   node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
       
   273   branch: default
       
   274   latesttag: null
       
   275   latesttagdistance: 2
       
   276   changessincelatesttag: 2
   251 
   277 
   252 
   278 
   253   $ cd ..
   279   $ cd ..
   254 
   280 
   255 Exchange Test
   281 Exchange Test
   588   cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
   614   cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
   589   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   615   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   590 
   616 
   591 #if serve
   617 #if serve
   592 
   618 
       
   619 Test the debug output for exchange
       
   620 ----------------------------------
       
   621 
       
   622   $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' --config 'experimental.bundle2-exp=True'
       
   623   pulling from ../tmpb
       
   624   searching for changes
       
   625   no changes found
       
   626   obsmarker-exchange: 346 bytes received
       
   627 
   593 check hgweb does not explode
   628 check hgweb does not explode
   594 ====================================
   629 ====================================
   595 
   630 
   596   $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
   631   $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
   597   adding changesets
   632   adding changesets
   619   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph'
   654   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph'
   620   200 Script output follows
   655   200 Script output follows
   621 
   656 
   622 check filelog view
   657 check filelog view
   623 
   658 
   624   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg id --debug --id`/'babar'
   659   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
   625   200 Script output follows
   660   200 Script output follows
   626 
   661 
   627   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/68'
   662   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/68'
   628   200 Script output follows
   663   200 Script output follows
   629   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67'
   664   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67'
   751   $ hg --config extensions.strip= strip -r tip --no-backup
   786   $ hg --config extensions.strip= strip -r tip --no-backup
   752   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   787   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   753   $ hg tags
   788   $ hg tags
   754   visible                            0:193e9254ce7e
   789   visible                            0:193e9254ce7e
   755   tip                                0:193e9254ce7e
   790   tip                                0:193e9254ce7e
       
   791 
       
   792 #if serve
       
   793 
       
   794 Test issue 4506
       
   795 
       
   796   $ cd ..
       
   797   $ hg init repo-issue4506
       
   798   $ cd repo-issue4506
       
   799   $ echo "0" > foo
       
   800   $ hg add foo
       
   801   $ hg ci -m "content-0"
       
   802 
       
   803   $ hg up null
       
   804   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
   805   $ echo "1" > bar
       
   806   $ hg add bar
       
   807   $ hg ci -m "content-1"
       
   808   created new head
       
   809   $ hg up 0
       
   810   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
   811   $ hg graft 1
       
   812   grafting 1:1c9eddb02162 "content-1" (tip)
       
   813 
       
   814   $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
       
   815 
       
   816   $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
       
   817   $ cat hg.pid >> $DAEMON_PIDS
       
   818 
       
   819   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/1'
       
   820   404 Not Found
       
   821   [1]
       
   822   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'file/tip/bar'
       
   823   200 Script output follows
       
   824   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'annotate/tip/bar'
       
   825   200 Script output follows
       
   826 
       
   827   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
       
   828 
       
   829 #endif
       
   830