tests/test-simple4server-bundle2.t
branchstable
changeset 2259 94432e742a02
parent 1814 efda653c96a7
parent 2258 446824c5e0b8
child 2260 e200dbfb4515
child 2263 165ad227993d
equal deleted inserted replaced
1814:efda653c96a7 2259:94432e742a02
     1 
       
     2   $ cat >> $HGRCPATH <<EOF
       
     3   > [defaults]
       
     4   > amend=-d "0 0"
       
     5   > [web]
       
     6   > push_ssl = false
       
     7   > allow_push = *
       
     8   > [phases]
       
     9   > publish = False
       
    10   > [experimental]
       
    11   > bundle2-exp=True
       
    12   > EOF
       
    13 
       
    14   $ mkcommit() {
       
    15   >    echo "$1" > "$1"
       
    16   >    hg add "$1"
       
    17   >    hg ci -m "add $1"
       
    18   > }
       
    19 
       
    20 setup repo
       
    21 
       
    22   $ hg init server
       
    23   $ echo "[extensions]" >> ./server/.hg/hgrc
       
    24   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/simple4server.py" >> ./server/.hg/hgrc
       
    25   $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
       
    26   $ cat hg.pid >> $DAEMON_PIDS
       
    27 
       
    28   $ hg clone http://localhost:$HGPORT/ client
       
    29   no changes found
       
    30   updating to branch default
       
    31   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    32   $ cat ./errors.log
       
    33   $ echo "[extensions]" >> ./client/.hg/hgrc
       
    34   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> ./client/.hg/hgrc
       
    35   $ cp -r client other
       
    36 
       
    37 Smoke testing
       
    38 ===============
       
    39 
       
    40   $ cd client
       
    41   $ mkcommit 0
       
    42   $ mkcommit a
       
    43   $ hg push
       
    44   pushing to http://localhost:$HGPORT/
       
    45   searching for changes
       
    46   remote: adding changesets
       
    47   remote: adding manifests
       
    48   remote: adding file changes
       
    49   remote: added 2 changesets with 2 changes to 2 files
       
    50   $ hg pull
       
    51   pulling from http://localhost:$HGPORT/
       
    52   searching for changes
       
    53   no changes found
       
    54   $ cat ../errors.log
       
    55   $ hg pull -R ../other
       
    56   pulling from http://localhost:$HGPORT/
       
    57   requesting all changes
       
    58   adding changesets
       
    59   adding manifests
       
    60   adding file changes
       
    61   added 2 changesets with 2 changes to 2 files
       
    62   (run 'hg update' to get a working copy)
       
    63   $ cat ../errors.log
       
    64   $ hg push -R ../other
       
    65   pushing to http://localhost:$HGPORT/
       
    66   searching for changes
       
    67   no changes found
       
    68   [1]
       
    69   $ cat ../errors.log
       
    70 
       
    71 Capacity testing
       
    72 ===================
       
    73 
       
    74   $ curl -s http://localhost:$HGPORT/?cmd=hello
       
    75   capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob)
       
    76   $ curl -s http://localhost:$HGPORT/?cmd=capabilities
       
    77   * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob)
       
    78 
       
    79   $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
       
    80   bookmarks	
       
    81   namespaces	
       
    82   obsolete	
       
    83   phases	
       
    84 
       
    85 Push
       
    86 =============
       
    87 
       
    88   $ echo 'A' > a
       
    89   $ hg amend
       
    90   $ hg push
       
    91   pushing to http://localhost:$HGPORT/
       
    92   searching for changes
       
    93   remote: adding changesets
       
    94   remote: adding manifests
       
    95   remote: adding file changes
       
    96   remote: added 1 changesets with 1 changes to 1 files (+1 heads)
       
    97   remote: 2 new obsolescence markers
       
    98   $ cat ../errors.log
       
    99   $ hg push
       
   100   pushing to http://localhost:$HGPORT/
       
   101   searching for changes
       
   102   no changes found
       
   103   [1]
       
   104   $ cat ../errors.log
       
   105 
       
   106 Pull
       
   107 =============
       
   108 
       
   109   $ hg -R ../other pull
       
   110   pulling from http://localhost:$HGPORT/
       
   111   searching for changes
       
   112   adding changesets
       
   113   adding manifests
       
   114   adding file changes
       
   115   added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
       
   116   2 new obsolescence markers
       
   117   (run 'hg heads' to see heads, 'hg merge' to merge)
       
   118   $ cat ../errors.log
       
   119   $ hg -R ../other pull
       
   120   pulling from http://localhost:$HGPORT/
       
   121   searching for changes
       
   122   no changes found
       
   123   $ cat ../errors.log
       
   124 
       
   125   $ cd ..
       
   126 
       
   127 Test disabling obsolete advertisement
       
   128 ===========================================
       
   129 (used by bitbucket to select which repo use evolve)
       
   130 
       
   131   $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
       
   132   bookmarks	
       
   133   namespaces	
       
   134   obsolete	
       
   135   phases	
       
   136   $ curl -s http://localhost:$HGPORT/?cmd=hello
       
   137   capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob)
       
   138   $ curl -s http://localhost:$HGPORT/?cmd=capabilities
       
   139   * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob)
       
   140 
       
   141   $ echo '[__temporary__]' >> server/.hg/hgrc
       
   142   $ echo 'advertiseobsolete=False' >> server/.hg/hgrc
       
   143   $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
       
   144   $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
       
   145   $ cat hg.pid >> $DAEMON_PIDS
       
   146 
       
   147   $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
       
   148   bookmarks	
       
   149   namespaces	
       
   150   phases	
       
   151 
       
   152   $ echo 'advertiseobsolete=True' >> server/.hg/hgrc
       
   153   $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
       
   154   $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
       
   155   $ cat hg.pid >> $DAEMON_PIDS
       
   156 
       
   157   $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
       
   158   bookmarks	
       
   159   namespaces	
       
   160   obsolete	
       
   161   phases	
       
   162 
       
   163   $ curl -s http://localhost:$HGPORT/?cmd=hello
       
   164   capabilities: * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (glob)
       
   165   $ curl -s http://localhost:$HGPORT/?cmd=capabilities
       
   166   * _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_obshash_1 _evoext_getbundle_obscommon (no-eol) (glob)