tests/test-push.t
changeset 43163 5617b748aad8
parent 42903 d7304434390f
child 45846 8d72e29ad1e0
equal deleted inserted replaced
43162:3c6976b1f693 43163:5617b748aad8
   346   pushing to ssh://fakehost%7Ctouch%20owned/path
   346   pushing to ssh://fakehost%7Ctouch%20owned/path
   347   abort: no suitable response from remote hg!
   347   abort: no suitable response from remote hg!
   348   [255]
   348   [255]
   349 
   349 
   350   $ [ ! -f owned ] || echo 'you got owned'
   350   $ [ ! -f owned ] || echo 'you got owned'
       
   351 
       
   352 Test `commands.push.require-revs`
       
   353 ---------------------------------
       
   354 
       
   355   $ hg clone -q test-revflag test-require-revs-source
       
   356   $ hg init test-require-revs-dest
       
   357   $ cd test-require-revs-source
       
   358   $ cat >> .hg/hgrc << EOF
       
   359   > [paths]
       
   360   > default = ../test-require-revs-dest
       
   361   > [commands]
       
   362   > push.require-revs=1
       
   363   > EOF
       
   364   $ hg push
       
   365   pushing to $TESTTMP/test-require-revs-dest
       
   366   abort: no revisions specified to push
       
   367   (did you mean "hg push -r ."?)
       
   368   [255]
       
   369   $ hg push -r 0
       
   370   pushing to $TESTTMP/test-require-revs-dest
       
   371   searching for changes
       
   372   adding changesets
       
   373   adding manifests
       
   374   adding file changes
       
   375   added 1 changesets with 1 changes to 1 files
       
   376   $ hg bookmark -r 0 push-this-bookmark
       
   377 (test that -B (bookmark) works for specifying "revs")
       
   378   $ hg push -B push-this-bookmark
       
   379   pushing to $TESTTMP/test-require-revs-dest
       
   380   searching for changes
       
   381   no changes found
       
   382   exporting bookmark push-this-bookmark
       
   383   [1]
       
   384 (test that -b (branch)  works for specifying "revs")
       
   385   $ hg push -b default
       
   386   pushing to $TESTTMP/test-require-revs-dest
       
   387   searching for changes
       
   388   abort: push creates new remote head [0-9a-f]+! (re)
       
   389   (merge or see 'hg help push' for details about pushing new heads)
       
   390   [255]
       
   391 (demonstrate that even though we don't have anything to exchange, we're still
       
   392 showing the error)
       
   393   $ hg push
       
   394   pushing to $TESTTMP/test-require-revs-dest
       
   395   abort: no revisions specified to push
       
   396   (did you mean "hg push -r ."?)
       
   397   [255]
       
   398   $ hg push --config paths.default:pushrev=0
       
   399   pushing to $TESTTMP/test-require-revs-dest
       
   400   searching for changes
       
   401   no changes found
       
   402   [1]