tests/test-clonebundles.t
changeset 26688 7394536338bb
parent 26648 c347d532bb56
child 26691 23c0da28c034
equal deleted inserted replaced
26687:6a854f558926 26688:7394536338bb
    69   $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
    69   $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
    70   $ hg clone http://localhost:$HGPORT 404-url
    70   $ hg clone http://localhost:$HGPORT 404-url
    71   applying clone bundle from http://does.not.exist/bundle.hg
    71   applying clone bundle from http://does.not.exist/bundle.hg
    72   error fetching bundle: [Errno -2] Name or service not known
    72   error fetching bundle: [Errno -2] Name or service not known
    73   abort: error applying bundle
    73   abort: error applying bundle
    74   (consider contacting the server operator if this error persists)
    74   (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false")
    75   [255]
    75   [255]
    76 
    76 
    77 Server is not running aborts
    77 Server is not running aborts
    78 
    78 
    79   $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
    79   $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
    80   $ hg clone http://localhost:$HGPORT server-not-runner
    80   $ hg clone http://localhost:$HGPORT server-not-runner
    81   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
    81   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
    82   error fetching bundle: [Errno 111] Connection refused
    82   error fetching bundle: [Errno 111] Connection refused
    83   abort: error applying bundle
    83   abort: error applying bundle
    84   (consider contacting the server operator if this error persists)
    84   (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false")
    85   [255]
    85   [255]
    86 
    86 
    87 Server returns 404
    87 Server returns 404
    88 
    88 
    89   $ python $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
    89   $ python $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
    90   $ cat http.pid >> $DAEMON_PIDS
    90   $ cat http.pid >> $DAEMON_PIDS
    91   $ hg clone http://localhost:$HGPORT running-404
    91   $ hg clone http://localhost:$HGPORT running-404
    92   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
    92   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
    93   HTTP error fetching bundle: HTTP Error 404: File not found
    93   HTTP error fetching bundle: HTTP Error 404: File not found
    94   abort: error applying bundle
    94   abort: error applying bundle
    95   (consider contacting the server operator if this error persists)
    95   (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false")
    96   [255]
    96   [255]
    97 
    97 
    98 We can override failure to fall back to regular clone
    98 We can override failure to fall back to regular clone
    99 
    99 
   100   $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
   100   $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback