# HG changeset patch # User Martin Geisler # Date 1282056767 -7200 # Node ID d521e72314f98e96c91fb30f0577ad4544634e30 # Parent e31e5eb8736c5b05b85202693f1e98cad4f1288b tests: unify test-subrepo-relative-path diff -r e31e5eb8736c -r d521e72314f9 tests/test-subrepo-relative-path --- a/tests/test-subrepo-relative-path Tue Aug 17 16:52:42 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -#!/bin/sh - -echo % Preparing the subrepository 'sub' -hg init sub -echo sub > sub/sub -hg add -R sub -hg commit -R sub -m "sub import" - -echo % Preparing the 'main' repo which depends on the subrepo 'sub' -hg init main -echo main > main/main -echo "sub = ../sub" > main/.hgsub -hg clone sub main/sub | sed 's/ .*sub/ ...sub/g' -hg add -R main -hg commit -R main -m "main import" - -echo % Cleaning both repositories, just as a clone -U -hg up -C -R sub null -hg up -C -R main null -rm -rf main/sub - -echo % Serving them both using hgweb -printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf -hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ - -A /dev/null -E /dev/null --pid-file hg.pid -d -cat hg.pid >> $DAEMON_PIDS - -echo % Clone main from hgweb -hg clone "http://localhost:$HGPORT/main" cloned | sed 's/ .*sub/ ...sub/g' - -echo % Checking cloned repo ids -hg id -R cloned -hg id -R cloned/sub - -echo % subrepo debug for 'main' clone -hg debugsub -R cloned - -"$TESTDIR/killdaemons.py" - -exit 0 diff -r e31e5eb8736c -r d521e72314f9 tests/test-subrepo-relative-path.out --- a/tests/test-subrepo-relative-path.out Tue Aug 17 16:52:42 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -% Preparing the subrepository sub -adding sub/sub -% Preparing the main repo which depends on the subrepo sub -updating to branch default -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -adding main/.hgsub -adding main/main -committing subrepository sub -% Cleaning both repositories, just as a clone -U -0 files updated, 0 files merged, 1 files removed, 0 files unresolved -0 files updated, 0 files merged, 3 files removed, 0 files unresolved -% Serving them both using hgweb -% Clone main from hgweb -requesting all changes -adding changesets -adding manifests -adding file changes -added 1 changesets with 3 changes to 3 files -updating to branch default -pulling ...sub -requesting all changes -adding changesets -adding manifests -adding file changes -added 1 changesets with 1 changes to 1 files -3 files updated, 0 files merged, 0 files removed, 0 files unresolved -% Checking cloned repo ids -fdfeeb3e979e tip -863c1745b441 tip -% subrepo debug for main clone -path sub - source ../sub - revision 863c1745b441bd97a8c4a096e87793073f4fb215 diff -r e31e5eb8736c -r d521e72314f9 tests/test-subrepo-relative-path.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-subrepo-relative-path.t Tue Aug 17 16:52:47 2010 +0200 @@ -0,0 +1,71 @@ +Preparing the subrepository 'sub' + + $ hg init sub + $ echo sub > sub/sub + $ hg add -R sub + adding sub/sub + $ hg commit -R sub -m "sub import" + +Preparing the 'main' repo which depends on the subrepo 'sub' + + $ hg init main + $ echo main > main/main + $ echo "sub = ../sub" > main/.hgsub + $ hg clone sub main/sub + updating to branch default + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg add -R main + adding main/.hgsub + adding main/main + $ hg commit -R main -m "main import" + committing subrepository sub + +Cleaning both repositories, just as a clone -U + + $ hg up -C -R sub null + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg up -C -R main null + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + $ rm -rf main/sub + +Serving them both using hgweb + + $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf + $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ + > -A /dev/null -E /dev/null --pid-file hg.pid -d + $ cat hg.pid >> $DAEMON_PIDS + +Clone main from hgweb + + $ hg clone "http://localhost:$HGPORT/main" cloned + requesting all changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 3 changes to 3 files + updating to branch default + pulling subrepo sub from http://localhost:[0-9]+/sub + requesting all changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + +Checking cloned repo ids + + $ hg id -R cloned + fdfeeb3e979e tip + $ hg id -R cloned/sub + 863c1745b441 tip + +subrepo debug for 'main' clone + + $ hg debugsub -R cloned + path sub + source ../sub + revision 863c1745b441bd97a8c4a096e87793073f4fb215 + + $ "$TESTDIR/killdaemons.py" + + $ exit 0