[PATCH] tests: unify test-clone

Nicolas Dumazet nicdumz at gmail.com
Thu Aug 12 08:40:51 CDT 2010


On Tue, 10 Aug 2010 13:33:49 +0200
Adrian Buehlmann <adrian at cadifra.com> wrote:

> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1281439288 -7200
> # Node ID 610af09e220feb13ec9b62d15ce97fbb55d274d6
> # Parent  4b8dc59e22b946451c1b5e23b11d6f3572989909
> tests: unify test-clone

Thank you Adrian, pushed to crew :)

-Nicolas.

> 
> diff --git a/tests/test-clone.out b/tests/test-clone.out
> deleted file mode 100644
> --- a/tests/test-clone.out
> +++ /dev/null
> @@ -1,316 +0,0 @@
> -
> -% 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 to branch default
> -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
> -2 files, 11 changesets, 11 total revisions
> -
> -% no update, with debug option
> -linked 8 files
> -a not present
> -checking changesets
> -checking manifests
> -crosschecking files in changesets and manifests
> -checking files
> -2 files, 11 changesets, 11 total revisions
> -
> -% default destination
> -destination directory: a
> -updating to branch default
> -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 to branch default
> -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 to branch default
> -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
> -
> -% clone to .
> -updating to branch default
> -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -
> -% *** tests for option -u ***
> -
> -
> -% adding some more history to repo a
> -% tag ref1
> -% updating back to ref1
> -1 files updated, 0 files merged, 1 files removed, 0 files unresolved
> -
> -% add branch 'stable' to repo a for later tests
> -marked working directory as branch stable
> -% tag ref2
> -
> -% updating back to ref2
> -1 files updated, 0 files merged, 1 files removed, 0 files unresolved
> -
> -% parents of repo a
> -changeset:   13:e8ece76546a6
> -branch:      stable
> -tag:         ref2
> -parent:      10:a7949464abda
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     starting branch stable
> -
> -
> -% repo a has two heads
> -changeset:   15:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   12:f21241060d6a
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     hacked default
> -
> -
> -% testing clone -U -u 1 a ua (must abort)
> -abort: cannot specify both --noupdate and --updaterev
> -
> -% testing clone -u . a ua
> -updating to branch stable
> -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -% repo ua has both heads
> -changeset:   15:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   12:f21241060d6a
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     hacked default
> -
> -
> -% same revision checked out in repo a and ua
> -e8ece76546a6
> -e8ece76546a6
> -
> -% testing clone --pull -u . a ua
> -requesting all changes
> -adding changesets
> -adding manifests
> -adding file changes
> -added 16 changesets with 16 changes to 3 files (+1 heads)
> -updating to branch stable
> -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -% repo ua has both heads
> -changeset:   15:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   12:f21241060d6a
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     hacked default
> -
> -
> -% same revision checked out in repo a and ua
> -e8ece76546a6
> -e8ece76546a6
> -
> -% testing clone -u stable a ua
> -updating to branch stable
> -3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -% repo ua has both heads
> -changeset:   15:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   12:f21241060d6a
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     hacked default
> -
> -
> -% branch stable is checked out
> -changeset:   15:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -
> -% testing clone a ua
> -updating to branch default
> -3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -% repo ua has both heads
> -changeset:   15:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   12:f21241060d6a
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     hacked default
> -
> -
> -% branch default is checked out
> -changeset:   12:f21241060d6a
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     hacked default
> -
> -
> -% testing clone -u . a#stable ua
> -requesting all changes
> -adding changesets
> -adding manifests
> -adding file changes
> -added 14 changesets with 14 changes to 3 files
> -updating to branch stable
> -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -% repo ua has only branch stable
> -changeset:   13:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   10:a7949464abda
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     test
> -
> -
> -% same revision checked out in repo a and ua
> -e8ece76546a6
> -e8ece76546a6
> -
> -% testing clone -u . -r stable a ua
> -requesting all changes
> -adding changesets
> -adding manifests
> -adding file changes
> -added 14 changesets with 14 changes to 3 files
> -updating to branch stable
> -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -% repo ua has only branch stable
> -changeset:   13:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   10:a7949464abda
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     test
> -
> -
> -% same revision checked out in repo a and ua
> -e8ece76546a6
> -e8ece76546a6
> -
> -% testing clone -r stable a ua
> -requesting all changes
> -adding changesets
> -adding manifests
> -adding file changes
> -added 14 changesets with 14 changes to 3 files
> -updating to branch stable
> -3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -% repo ua has only branch stable
> -changeset:   13:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   10:a7949464abda
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     test
> -
> -
> -% branch stable is checked out
> -changeset:   13:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -
> -% testing clone -u . -r stable -r default a ua
> -requesting all changes
> -adding changesets
> -adding manifests
> -adding file changes
> -added 16 changesets with 16 changes to 3 files (+1 heads)
> -updating to branch stable
> -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> -
> -% repo ua has two heads
> -changeset:   15:0aae7cf88f0d
> -branch:      stable
> -tag:         tip
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     another change for branch stable
> -
> -changeset:   12:f21241060d6a
> -user:        test
> -date:        Thu Jan 01 00:00:00 1970 +0000
> -summary:     hacked default
> -
> -
> -% same revision checked out in repo a and ua
> -e8ece76546a6
> -e8ece76546a6
> -updating to branch default
> -3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> diff --git a/tests/test-clone b/tests/test-clone.t
> old mode 100755
> new mode 100644
> rename from tests/test-clone
> rename to tests/test-clone.t
> --- a/tests/test-clone
> +++ b/tests/test-clone.t
> @@ -1,212 +1,433 @@
> -#!/bin/sh
> +Prepare repo a:
>  
> -echo
> -echo % prepare repo a
> -mkdir a
> -cd a
> -hg init
> -echo a > a
> -hg add a
> -hg commit -m test
> -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
> -done
> -echo % "list files in store/data (should show a 'b.d')"
> -for i in .hg/store/data/*; do
> -    echo $i
> -done
> +  $ mkdir a
> +  $ cd a
> +  $ hg init
> +  $ echo a > a
> +  $ hg add a
> +  $ hg commit -m test
> +  $ echo first line > b
> +  $ hg add b
>  
> -echo
> -echo % default operation
> -hg clone . ../b
> -cd ../b
> -cat a
> -hg verify
> +Create a non-inlined filelog:
>  
> -echo
> -echo % no update, with debug option
> -hg --debug clone -U . ../c
> -cd ../c
> -cat a 2>/dev/null || echo "a not present"
> -hg verify
> +  $ 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
> +  > done
>  
> -echo
> -echo % default destination
> -mkdir ../d
> -cd ../d
> -hg clone ../a
> -cd a
> -hg cat a
> +List files in store/data (should show a 'b.d'):
>  
> -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
> +  $ for i in .hg/store/data/*; do
> +  >   echo $i
> +  > done
> +  .hg/store/data/a.i
> +  .hg/store/data/b.d
> +  .hg/store/data/b.i
>  
> -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,.*/,,'
> +Default operation:
>  
> -echo
> -echo % use --pull
> -hg clone --pull a g
> -hg -R g verify
> +  $ hg clone . ../b
> +  updating to branch default
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  $ cd ../b
> +  $ cat a
> +  a
> +  $ hg verify
> +  checking changesets
> +  checking manifests
> +  crosschecking files in changesets and manifests
> +  checking files
> +  2 files, 11 changesets, 11 total revisions
>  
> -echo
> -echo % clone to '.'
> -mkdir h
> -cd h
> -hg clone ../a .
> -cd ..
> +No update, with debug option:
>  
> -echo
> -echo
> -echo % "*** tests for option -u ***"
> -echo
> +  $ hg --debug clone -U . ../c
> +  linked 8 files
> +  $ cd ../c
> +  $ cat a 2>/dev/null || echo "a not present"
> +  a not present
> +  $ hg verify
> +  checking changesets
> +  checking manifests
> +  crosschecking files in changesets and manifests
> +  checking files
> +  2 files, 11 changesets, 11 total revisions
>  
> +Default destination:
>  
> -echo
> -echo % "adding some more history to repo a"
> -cd a
> -echo % "tag ref1"
> -hg tag ref1
> -echo the quick brown fox >a
> -hg ci -m "hacked default"
> -echo % "updating back to ref1"
> -hg up ref1
> -echo
> -echo % "add branch 'stable' to repo a for later tests"
> -hg branch stable
> -echo some text >a
> -hg ci -m "starting branch stable"
> -echo % "tag ref2"
> -hg tag ref2
> -echo some more text >a
> -hg ci -m "another change for branch stable"
> -echo
> -echo % "updating back to ref2"
> -hg up ref2
> -echo
> -echo % "parents of repo a"
> -hg parents
> -echo
> -echo % "repo a has two heads"
> -hg heads
> -cd ..
> +  $ mkdir ../d
> +  $ cd ../d
> +  $ hg clone ../a
> +  destination directory: a
> +  updating to branch default
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  $ cd a
> +  $ hg cat a
> +  a
> +  $ cd ../..
>  
> -echo
> -echo % "testing clone -U -u 1 a ua (must abort)"
> -hg clone -U -u 1 a ua
> +Check that we drop the 'file:' from the path before writing the .hgrc:
>  
> -echo
> -echo % "testing clone -u . a ua"
> -hg clone -u . a ua
> -echo
> -echo % "repo ua has both heads"
> -hg -R ua heads
> -echo
> -echo % "same revision checked out in repo a and ua"
> -hg -R a parents --template "{node|short}\n"
> -hg -R ua parents --template "{node|short}\n"
> -rm -r ua
> +  $ hg clone file:a e
> +  updating to branch default
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  $ grep 'file:' e/.hg/hgrc
>  
> -echo
> -echo % "testing clone --pull -u . a ua"
> -hg clone --pull -u . a ua
> -echo
> -echo % "repo ua has both heads"
> -hg -R ua heads
> -echo
> -echo % "same revision checked out in repo a and ua"
> -hg -R a parents --template "{node|short}\n"
> -hg -R ua parents --template "{node|short}\n"
> -rm -r ua
> +Check that path aliases are expanded:
>  
> -echo
> -echo % "testing clone -u stable a ua"
> -hg clone -u stable a ua
> -echo
> -echo % "repo ua has both heads"
> -hg -R ua heads
> -echo
> -echo % "branch stable is checked out"
> -hg -R ua parents
> -rm -r ua
> +  $ hg clone -q -U --config 'paths.foobar=a#0' foobar f
> +  $ hg -R f showconfig paths.default
> +  .*/a#0
>  
> -echo
> -echo % "testing clone a ua"
> -hg clone a ua
> -echo
> -echo % "repo ua has both heads"
> -hg -R ua heads
> -echo
> -echo % "branch default is checked out"
> -hg -R ua parents
> -rm -r ua
> +Use --pull:
>  
> -echo
> -echo % "testing clone -u . a#stable ua"
> -hg clone -u . a#stable ua
> -echo
> -echo % "repo ua has only branch stable"
> -hg -R ua heads
> -echo
> -echo % "same revision checked out in repo a and ua"
> -hg -R a parents --template "{node|short}\n"
> -hg -R ua parents --template "{node|short}\n"
> -rm -r ua
> +  $ hg clone --pull a g
> +  requesting all changes
> +  adding changesets
> +  adding manifests
> +  adding file changes
> +  added 11 changesets with 11 changes to 2 files
> +  updating to branch default
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  $ hg -R g verify
> +  checking changesets
> +  checking manifests
> +  crosschecking files in changesets and manifests
> +  checking files
> +  2 files, 11 changesets, 11 total revisions
>  
> -echo
> -echo % "testing clone -u . -r stable a ua"
> -hg clone -u . -r stable a ua
> -echo
> -echo % "repo ua has only branch stable"
> -hg -R ua heads
> -echo
> -echo % "same revision checked out in repo a and ua"
> -hg -R a parents --template "{node|short}\n"
> -hg -R ua parents --template "{node|short}\n"
> -rm -r ua
> +Clone to '.':
>  
> -echo
> -echo % "testing clone -r stable a ua"
> -hg clone -r stable a ua
> -echo
> -echo % "repo ua has only branch stable"
> -hg -R ua heads
> -echo
> -echo % "branch stable is checked out"
> -hg -R ua parents
> -rm -r ua
> +  $ mkdir h
> +  $ cd h
> +  $ hg clone ../a .
> +  updating to branch default
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  $ cd ..
>  
> -echo
> -echo % "testing clone -u . -r stable -r default a ua"
> -hg clone -u . -r stable -r default a ua
> -echo
> -echo % "repo ua has two heads"
> -hg -R ua heads
> -echo
> -echo % "same revision checked out in repo a and ua"
> -hg -R a parents --template "{node|short}\n"
> -hg -R ua parents --template "{node|short}\n"
> -rm -r ua
>  
> -cat <<EOF > simpleclone.py
> -from mercurial import ui, hg
> -myui = ui.ui()
> -repo = hg.repository(myui, 'a')
> -hg.clone(myui, repo, dest="ua")
> -EOF
> +*** Tests for option -u ***
>  
> -python simpleclone.py
> -rm -r ua
> +Adding some more history to repo a:
>  
> -exit 0
> +  $ cd a
> +  $ hg tag ref1
> +  $ echo the quick brown fox >a
> +  $ hg ci -m "hacked default"
> +  $ hg up ref1
> +  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
> +  $ hg branch stable
> +  marked working directory as branch stable
> +  $ echo some text >a
> +  $ hg ci -m "starting branch stable"
> +  $ hg tag ref2
> +  $ echo some more text >a
> +  $ hg ci -m "another change for branch stable"
> +  $ hg up ref2
> +  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
> +  $ hg parents
> +  changeset:   13:e8ece76546a6
> +  branch:      stable
> +  tag:         ref2
> +  parent:      10:a7949464abda
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     starting branch stable
> +  
> +
> +Repo a has two heads:
> +
> +  $ hg heads
> +  changeset:   15:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +  changeset:   12:f21241060d6a
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     hacked default
> +  
> +
> +  $ cd ..
> +
> +
> +Testing --noupdate with --updaterev (must abort):
> +
> +  $ hg clone --noupdate --updaterev 1 a ua
> +  abort: cannot specify both --noupdate and --updaterev
> +
> +
> +Testing clone -u:
> +
> +  $ hg clone -u . a ua
> +  updating to branch stable
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +Repo ua has both heads:
> +
> +  $ hg -R ua heads
> +  changeset:   15:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +  changeset:   12:f21241060d6a
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     hacked default
> +  
> +
> +Same revision checked out in repo a and ua:
> +
> +  $ hg -R a parents --template "{node|short}\n"
> +  e8ece76546a6
> +  $ hg -R ua parents --template "{node|short}\n"
> +  e8ece76546a6
> +
> +  $ rm -r ua
> +
> +
> +Testing clone --pull -u:
> +
> +  $ hg clone --pull -u . a ua
> +  requesting all changes
> +  adding changesets
> +  adding manifests
> +  adding file changes
> +  added 16 changesets with 16 changes to 3 files (+1 heads)
> +  updating to branch stable
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +Repo ua has both heads:
> +
> +  $ hg -R ua heads
> +  changeset:   15:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +  changeset:   12:f21241060d6a
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     hacked default
> +  
> +
> +Same revision checked out in repo a and ua:
> +
> +  $ hg -R a parents --template "{node|short}\n"
> +  e8ece76546a6
> +  $ hg -R ua parents --template "{node|short}\n"
> +  e8ece76546a6
> +
> +  $ rm -r ua
> +
> +
> +Testing clone -u <branch>:
> +
> +  $ hg clone -u stable a ua
> +  updating to branch stable
> +  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +Repo ua has both heads:
> +
> +  $ hg -R ua heads
> +  changeset:   15:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +  changeset:   12:f21241060d6a
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     hacked default
> +  
> +
> +Branch 'stable' is checked out:
> +
> +  $ hg -R ua parents
> +  changeset:   15:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +
> +  $ rm -r ua
> +
> +
> +Testing default checkout:
> +
> +  $ hg clone a ua
> +  updating to branch default
> +  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +Repo ua has both heads:
> +
> +  $ hg -R ua heads
> +  changeset:   15:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +  changeset:   12:f21241060d6a
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     hacked default
> +  
> +
> +Branch 'default' is checked out:
> +
> +  $ hg -R ua parents
> +  changeset:   12:f21241060d6a
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     hacked default
> +  
> +
> +  $ rm -r ua
> +
> +
> +Testing #<branch>:
> +
> +  $ hg clone -u . a#stable ua
> +  requesting all changes
> +  adding changesets
> +  adding manifests
> +  adding file changes
> +  added 14 changesets with 14 changes to 3 files
> +  updating to branch stable
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
> +
> +  $ hg -R ua heads
> +  changeset:   13:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +  changeset:   10:a7949464abda
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     test
> +  
> +
> +Same revision checked out in repo a and ua:
> +
> +  $ hg -R a parents --template "{node|short}\n"
> +  e8ece76546a6
> +  $ hg -R ua parents --template "{node|short}\n"
> +  e8ece76546a6
> +
> +  $ rm -r ua
> +
> +
> +Testing -u -r <branch>:
> +
> +  $ hg clone -u . -r stable a ua
> +  requesting all changes
> +  adding changesets
> +  adding manifests
> +  adding file changes
> +  added 14 changesets with 14 changes to 3 files
> +  updating to branch stable
> +  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
> +
> +  $ hg -R ua heads
> +  changeset:   13:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +  changeset:   10:a7949464abda
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     test
> +  
> +
> +Same revision checked out in repo a and ua:
> +
> +  $ hg -R a parents --template "{node|short}\n"
> +  e8ece76546a6
> +  $ hg -R ua parents --template "{node|short}\n"
> +  e8ece76546a6
> +
> +  $ rm -r ua
> +
> +
> +Testing -r <branch>:
> +
> +  $ hg clone -r stable a ua
> +  requesting all changes
> +  adding changesets
> +  adding manifests
> +  adding file changes
> +  added 14 changesets with 14 changes to 3 files
> +  updating to branch stable
> +  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
> +
> +  $ hg -R ua heads
> +  changeset:   13:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +  changeset:   10:a7949464abda
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     test
> +  
> +
> +Branch 'stable' is checked out:
> +
> +  $ hg -R ua parents
> +  changeset:   13:0aae7cf88f0d
> +  branch:      stable
> +  tag:         tip
> +  user:        test
> +  date:        Thu Jan 01 00:00:00 1970 +0000
> +  summary:     another change for branch stable
> +  
> +
> +  $ rm -r ua
> +
> +
> +Testing issue2267:
> +
> +  $ cat <<EOF > simpleclone.py
> +  > from mercurial import ui, hg
> +  > myui = ui.ui()
> +  > repo = hg.repository(myui, 'a')
> +  > hg.clone(myui, repo, dest="ua")
> +  > EOF
> +
> +  $ python simpleclone.py
> +  updating to branch default
> +  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +  $ rm -r ua
> +
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


-- 
Nicolas Dumazet — NicDumZ


More information about the Mercurial-devel mailing list