Mercurial > hg
changeset 12286:63352a7a8c1c
tests: unify test-clone-update-order
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Tue, 14 Sep 2010 18:43:24 +0200 |
parents | 5d9bc49b0b1e |
children | d8707306d667 |
files | tests/test-clone-update-order tests/test-clone-update-order.out tests/test-clone-update-order.t |
diffstat | 3 files changed, 110 insertions(+), 151 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-clone-update-order Tue Sep 14 21:41:06 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -#!/bin/sh - -echo -echo % prepare repo a -mkdir a -cd a -hg init -echo foo > bar -hg commit -Am default -hg up -r null -hg branch mine -echo hello > world -hg commit -Am hello -hg up -r null -hg branch other -echo good > bye -hg commit -Am other -hg up -r mine - -echo % test -U -u -hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other - -echo % test -U -hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other -rm -rf ../b - -echo % test -u . -hg clone -u . .#other ../b -r 0 -r 1 -r 2 -b other -rm -rf ../b - -echo % test -u 0 -hg clone -u 0 .#other ../b -r 0 -r 1 -r 2 -b other -rm -rf ../b - -echo % test -u 1 -hg clone -u 1 .#other ../b -r 0 -r 1 -r 2 -b other -rm -rf ../b - -echo % test -u 2 -hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other -rm -rf ../b - -echo % test -r 0 -hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other -rm -rf ../b - -echo % test -r mine ... mine is ignored -hg clone -u 2 .#other ../b -r mine -r 0 -r 1 -r 2 -b other -rm -rf ../b - -echo % test -b default -hg clone .#other ../b -b default -b mine -rm -rf ../b - -echo % test #other -hg clone .#other ../b -rm -rf ../b - -echo % test tip -hg clone -U . ../c -r 1 -r 2 > /dev/null -hg clone ../c ../b -rm -rf ../b ../c -cd .. - -rm -rf a -exit 0
--- a/tests/test-clone-update-order.out Tue Sep 14 21:41:06 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ - -% prepare repo a -adding bar -0 files updated, 0 files merged, 1 files removed, 0 files unresolved -marked working directory as branch mine -adding world -0 files updated, 0 files merged, 1 files removed, 0 files unresolved -marked working directory as branch other -adding bye -1 files updated, 0 files merged, 1 files removed, 0 files unresolved -% test -U -u -abort: cannot specify both --noupdate and --updaterev -% test -U -requesting all changes -adding changesets -adding manifests -adding file changes -added 3 changesets with 3 changes to 3 files (+2 heads) -% test -u . -requesting all changes -adding changesets -adding manifests -adding file changes -added 3 changesets with 3 changes to 3 files (+2 heads) -updating to branch mine -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% test -u 0 -requesting all changes -adding changesets -adding manifests -adding file changes -added 3 changesets with 3 changes to 3 files (+2 heads) -updating to branch default -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% test -u 1 -requesting all changes -adding changesets -adding manifests -adding file changes -added 3 changesets with 3 changes to 3 files (+2 heads) -updating to branch mine -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% test -u 2 -requesting all changes -adding changesets -adding manifests -adding file changes -added 3 changesets with 3 changes to 3 files (+2 heads) -updating to branch other -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% test -r 0 -requesting all changes -adding changesets -adding manifests -adding file changes -added 3 changesets with 3 changes to 3 files (+2 heads) -updating to branch other -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% test -r mine ... mine is ignored -requesting all changes -adding changesets -adding manifests -adding file changes -added 3 changesets with 3 changes to 3 files (+2 heads) -updating to branch other -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% test -b default -requesting all changes -adding changesets -adding manifests -adding file changes -added 3 changesets with 3 changes to 3 files (+2 heads) -updating to branch default -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% test -requesting all changes -adding changesets -adding manifests -adding file changes -added 1 changesets with 1 changes to 1 files -updating to branch other -1 files updated, 0 files merged, 0 files removed, 0 files unresolved -% test tip -updating to branch other -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-clone-update-order.t Tue Sep 14 18:43:24 2010 +0200 @@ -0,0 +1,110 @@ + $ hg init + $ echo foo > bar + $ hg commit -Am default + adding bar + $ hg up -r null + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg branch mine + marked working directory as branch mine + $ echo hello > world + $ hg commit -Am hello + adding world + $ hg up -r null + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg branch other + marked working directory as branch other + $ echo good > bye + $ hg commit -Am other + adding bye + $ hg up -r mine + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + + $ hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other + abort: cannot specify both --noupdate and --updaterev + + $ hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 3 files (+2 heads) + $ rm -rf ../b + + $ hg clone -u . .#other ../b -r 0 -r 1 -r 2 -b other + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 3 files (+2 heads) + updating to branch mine + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm -rf ../b + + $ hg clone -u 0 .#other ../b -r 0 -r 1 -r 2 -b other + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 3 files (+2 heads) + updating to branch default + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm -rf ../b + + $ hg clone -u 1 .#other ../b -r 0 -r 1 -r 2 -b other + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 3 files (+2 heads) + updating to branch mine + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm -rf ../b + + $ hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 3 files (+2 heads) + updating to branch other + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm -rf ../b + +Test -r mine ... mine is ignored: + + $ hg clone -u 2 .#other ../b -r mine -r 0 -r 1 -r 2 -b other + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 3 files (+2 heads) + updating to branch other + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm -rf ../b + + $ hg clone .#other ../b -b default -b mine + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 3 files (+2 heads) + updating to branch default + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm -rf ../b + + $ hg clone .#other ../b + requesting all changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + updating to branch other + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm -rf ../b + + $ hg clone -U . ../c -r 1 -r 2 > /dev/null + $ hg clone ../c ../b + updating to branch other + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ rm -rf ../b ../c +