tests/test-default-push.t
changeset 29413 31d3ab7985b8
parent 27570 44f717c87903
child 29965 b3100653bafd
equal deleted inserted replaced
29412:b62bce819d0c 29413:31d3ab7985b8
   103   adding changesets
   103   adding changesets
   104   adding manifests
   104   adding manifests
   105   adding file changes
   105   adding file changes
   106   added 1 changesets with 1 changes to 1 files
   106   added 1 changesets with 1 changes to 1 files
   107 
   107 
       
   108 :pushrev is used when no -r is passed
       
   109 
       
   110   $ cat >> .hg/hgrc << EOF
       
   111   > default:pushrev = .
       
   112   > EOF
       
   113   $ hg -q up -r 0
       
   114   $ echo head1 > foo
       
   115   $ hg -q commit -A -m head1
       
   116   $ hg -q up -r 0
       
   117   $ echo head2 > foo
       
   118   $ hg -q commit -A -m head2
       
   119   $ hg push -f
       
   120   pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob)
       
   121   searching for changes
       
   122   adding changesets
       
   123   adding manifests
       
   124   adding file changes
       
   125   added 1 changesets with 1 changes to 1 files (+1 heads)
       
   126 
       
   127   $ hg --config 'paths.default:pushrev=draft()' push -f
       
   128   pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob)
       
   129   searching for changes
       
   130   adding changesets
       
   131   adding manifests
       
   132   adding file changes
       
   133   added 1 changesets with 1 changes to 1 files (+1 heads)
       
   134 
       
   135 Invalid :pushrev raises appropriately
       
   136 
       
   137   $ hg --config 'paths.default:pushrev=notdefined()' push
       
   138   pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob)
       
   139   hg: parse error: unknown identifier: notdefined
       
   140   [255]
       
   141 
       
   142   $ hg --config 'paths.default:pushrev=(' push
       
   143   pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob)
       
   144   hg: parse error at 1: not a prefix: end
       
   145   [255]
       
   146 
   108   $ cd ..
   147   $ cd ..