# HG changeset patch # User Adrian Buehlmann # Date 2008-08-30 16:47:54 # Node ID a7fcb43af82e4a033e2dd34b7a1f60830e1fce50 # Parent 0061498f8ab8aa8ab50331499ad348ab03232dff increase code coverage of test-clone * add a non-inlined filelog to the test repo * add 'clone --pull' test case diff --git a/tests/test-clone b/tests/test-clone --- a/tests/test-clone +++ b/tests/test-clone @@ -1,39 +1,63 @@ #!/bin/sh +echo +echo % prepare repo a mkdir a cd a hg init echo a > a hg add a hg commit -m test -d '0 0' +echo first line > b +hg add b +# create a non-inlined filelog +python -c 'for x in range(10000): print x' >> data1 +for j in 0 1 2 3 4 5 6 7 8 9; do + cat data1 >> b + hg commit -m test -d '0 0' +done +echo % "list files in store/data (should show a 'b.d')" +for i in .hg/store/data/*; do + echo $i +done -# Default operation +echo +echo % default operation hg clone . ../b cd ../b cat a hg verify -# No update +echo +echo % no update hg clone -U . ../c cd ../c cat a 2>/dev/null || echo "a not present" hg verify -# Default destination +echo +echo % default destination mkdir ../d cd ../d hg clone ../a cd a hg cat a -# check that we drop the file:// from the path before -# writing the .hgrc +echo +echo % "check that we drop the file:// from the path before" +echo % "writing the .hgrc" cd ../.. hg clone file://a e grep 'file:' e/.hg/hgrc -# check that path aliases are expanded +echo +echo % check that path aliases are expanded hg clone -q -U --config 'paths.foobar=a#0' foobar f hg -R f showconfig paths.default | sed -e 's,.*/,,' +echo +echo % use --pull +hg clone --pull a g +hg -R g verify + exit 0 diff --git a/tests/test-clone.out b/tests/test-clone.out --- a/tests/test-clone.out +++ b/tests/test-clone.out @@ -1,21 +1,52 @@ + +% prepare repo a +% list files in store/data (should show a 'b.d') +.hg/store/data/a.i +.hg/store/data/b.d +.hg/store/data/b.i + +% default operation updating working directory -1 files updated, 0 files merged, 0 files removed, 0 files unresolved +2 files updated, 0 files merged, 0 files removed, 0 files unresolved a checking changesets checking manifests crosschecking files in changesets and manifests checking files -1 files, 1 changesets, 1 total revisions +2 files, 11 changesets, 11 total revisions + +% no update a not present checking changesets checking manifests crosschecking files in changesets and manifests checking files -1 files, 1 changesets, 1 total revisions +2 files, 11 changesets, 11 total revisions + +% default destination destination directory: a updating working directory -1 files updated, 0 files merged, 0 files removed, 0 files unresolved +2 files updated, 0 files merged, 0 files removed, 0 files unresolved a + +% check that we drop the file:// from the path before +% writing the .hgrc updating working directory -1 files updated, 0 files merged, 0 files removed, 0 files unresolved +2 files updated, 0 files merged, 0 files removed, 0 files unresolved + +% check that path aliases are expanded a#0 + +% use --pull +requesting all changes +adding changesets +adding manifests +adding file changes +added 11 changesets with 11 changes to 2 files +updating working directory +2 files updated, 0 files merged, 0 files removed, 0 files unresolved +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +2 files, 11 changesets, 11 total revisions