tests/test-inhibit.t
changeset 1368 c02cdb97ebfa
parent 1360 5c13945b32fc
child 1443 6c122c975125
equal deleted inserted replaced
1367:0c134ca37567 1368:c02cdb97ebfa
   719   > testextension=!
   719   > testextension=!
   720   > EOF
   720   > EOF
   721   $ hg up 15
   721   $ hg up 15
   722   abort: Cannot use inhibit without the direct access extension
   722   abort: Cannot use inhibit without the direct access extension
   723   [255]
   723   [255]
   724 
   724   $ echo "directaccess=$(echo $(dirname $TESTDIR))/hgext/directaccess.py" >> $HGRCPATH
   725 
   725   $ cd ..
       
   726 
       
   727 
       
   728 hg push should not allow directaccess unless forced with --hidden
       
   729 We copy the inhibhit repo to inhibit2 and make some changes to push to inhibit
       
   730 
       
   731   $ cp -r inhibit inhibit2
       
   732   $ pwd=$(pwd)
       
   733   $ cd inhibit
       
   734   $ mkcommit pk
       
   735   $ hg id
       
   736   003a4735afde tip
       
   737   $ echo "OO" > pk
       
   738   $ hg amend
       
   739   $ hg id
       
   740   71eb4f100663 tip
       
   741 
       
   742 Hidden commits cannot be pushed without --hidden
       
   743   $ hg push -r 003a4735afde file://$pwd/inhibit2
       
   744   pushing to file://$TESTTMP/inhibit2
       
   745   abort: hidden revision '003a4735afde'!
       
   746   (use --hidden to access hidden revisions)
       
   747   [255]
       
   748 
       
   749 Visible commits can still be pushed
       
   750   $ hg push -r 71eb4f100663 file://$pwd/inhibit2
       
   751   pushing to file://$TESTTMP/inhibit2
       
   752   searching for changes
       
   753   adding changesets
       
   754   adding manifests
       
   755   adding file changes
       
   756   added 1 changesets with 1 changes to 1 files
       
   757   2 new obsolescence markers