tests/test-narrow-clone-non-narrow-server.t
changeset 37661 afe624d78d43
parent 36993 f4c7dc24e889
child 39523 c90514043eaa
equal deleted inserted replaced
37660:9dfa4e9ed45d 37661:afe624d78d43
    16   $ cat hg.pid >> "$DAEMON_PIDS"
    16   $ cat hg.pid >> "$DAEMON_PIDS"
    17   $ hg serve -a localhost -p $HGPORT2 -d --pid-file=hg.pid
    17   $ hg serve -a localhost -p $HGPORT2 -d --pid-file=hg.pid
    18   $ cat hg.pid >> "$DAEMON_PIDS"
    18   $ cat hg.pid >> "$DAEMON_PIDS"
    19 
    19 
    20 Verify that narrow is advertised in the bundle2 capabilities:
    20 Verify that narrow is advertised in the bundle2 capabilities:
       
    21 
       
    22   $ cat >> unquote.py <<EOF
       
    23   > from __future__ import print_function
       
    24   > import sys
       
    25   > if sys.version[0] == '3':
       
    26   >     import urllib.parse as up
       
    27   >     unquote = up.unquote_plus
       
    28   > else:
       
    29   >     import urllib
       
    30   >     unquote = urllib.unquote_plus
       
    31   > print(unquote(list(sys.stdin)[1]))
       
    32   > EOF
    21   $ echo hello | hg -R . serve --stdio | \
    33   $ echo hello | hg -R . serve --stdio | \
    22   >   $PYTHON -c "from __future__ import print_function; import sys, urllib; print(urllib.unquote_plus(list(sys.stdin)[1]))" | grep narrow
    34   >   $PYTHON unquote.py | grep narrow
    23   narrow=v0
    35   narrow=v0
    24 
    36 
    25   $ cd ..
    37   $ cd ..
    26 
    38 
    27   $ hg clone --narrow --include f1 http://localhost:$HGPORT1/ narrowclone
    39   $ hg clone --narrow --include f1 http://localhost:$HGPORT1/ narrowclone