tests/test-treemanifest.t
branchstable
changeset 27953 88609cfa3745
parent 27952 c5ffbd4c033b
child 28005 ed94b24a3bb2
equal deleted inserted replaced
27952:c5ffbd4c033b 27953:88609cfa3745
     1   $ cat << EOF >> $HGRCPATH
     1   $ cat << EOF >> $HGRCPATH
     2   > [format]
     2   > [format]
     3   > usegeneraldelta=yes
     3   > usegeneraldelta=yes
       
     4   > [ui]
       
     5   > ssh=python "$TESTDIR/dummyssh"
     4   > EOF
     6   > EOF
     5 
     7 
     6 Set up repo
     8 Set up repo
     7 
     9 
     8   $ hg --config experimental.treemanifest=True init repo
    10   $ hg --config experimental.treemanifest=True init repo
   201   $ hg merge 1
   203   $ hg merge 1
   202   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   204   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   203   (branch merge, don't forget to commit)
   205   (branch merge, don't forget to commit)
   204   $ hg ci -m 'merge of flat manifests to new flat manifest'
   206   $ hg ci -m 'merge of flat manifests to new flat manifest'
   205 
   207 
       
   208   $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
       
   209   $ cat hg.pid >> $DAEMON_PIDS
       
   210 
   206 Create clone with tree manifests enabled
   211 Create clone with tree manifests enabled
   207 
   212 
   208   $ cd ..
   213   $ cd ..
   209   $ hg clone --pull --config experimental.treemanifest=1 repo-flat repo-mixed
   214   $ hg clone --config experimental.treemanifest=1 \
   210   requesting all changes
   215   >   http://localhost:$HGPORT repo-mixed -r 1
   211   adding changesets
   216   adding changesets
   212   adding manifests
   217   adding manifests
   213   adding file changes
   218   adding file changes
   214   added 4 changesets with 17 changes to 11 files
   219   added 2 changesets with 14 changes to 11 files
   215   updating to branch default
   220   updating to branch default
   216   11 files updated, 0 files merged, 0 files removed, 0 files unresolved
   221   11 files updated, 0 files merged, 0 files removed, 0 files unresolved
   217   $ cd repo-mixed
   222   $ cd repo-mixed
   218   $ test -d .hg/store/meta
   223   $ test -d .hg/store/meta
   219   [1]
   224   [1]
   220   $ grep treemanifest .hg/requires
   225   $ grep treemanifest .hg/requires
   221   treemanifest
   226   treemanifest
   222 
   227 
       
   228 Should be possible to push updates from flat to tree manifest repo
       
   229 
       
   230   $ hg -R ../repo-flat push ssh://user@dummy/repo-mixed
       
   231   pushing to ssh://user@dummy/repo-mixed
       
   232   searching for changes
       
   233   remote: adding changesets
       
   234   remote: adding manifests
       
   235   remote: adding file changes
       
   236   remote: added 2 changesets with 3 changes to 3 files
       
   237 
   223 Commit should store revlog per directory
   238 Commit should store revlog per directory
   224 
   239 
   225   $ hg co 1
   240   $ hg co 1
   226   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   241   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   227   $ echo 3 > a
   242   $ echo 3 > a
   228   $ echo 3 > dir1/a
   243   $ echo 3 > dir1/a
   229   $ echo 3 > dir1/dir1/a
   244   $ echo 3 > dir1/dir1/a
   230   $ hg ci -m 'first tree'
   245   $ hg ci -m 'first tree'
   231   created new head
   246   created new head
   454   $ hg ci -m narf
   469   $ hg ci -m narf
   455   $ echo troz >> b/bar/orange/fly/gnat.py
   470   $ echo troz >> b/bar/orange/fly/gnat.py
   456   $ hg ci -m troz
   471   $ hg ci -m troz
   457 
   472 
   458 Test cloning a treemanifest repo over http.
   473 Test cloning a treemanifest repo over http.
   459   $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
   474   $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --errorlog=errors.log
   460   $ cat hg.pid >> $DAEMON_PIDS
   475   $ cat hg.pid >> $DAEMON_PIDS
   461   $ cd ..
   476   $ cd ..
   462 We can clone even with the knob turned off and we'll get a treemanifest repo.
   477 We can clone even with the knob turned off and we'll get a treemanifest repo.
   463   $ hg clone --config experimental.treemanifest=False \
   478   $ hg clone --config experimental.treemanifest=False \
   464   >   --config experimental.changegroup3=True \
   479   >   --config experimental.changegroup3=True \
   465   >   http://localhost:$HGPORT deepclone
   480   >   http://localhost:$HGPORT2 deepclone
   466   requesting all changes
   481   requesting all changes
   467   adding changesets
   482   adding changesets
   468   adding manifests
   483   adding manifests
   469   adding file changes
   484   adding file changes
   470   added 3 changesets with 10 changes to 8 files
   485   added 3 changesets with 10 changes to 8 files