[PATCH 14 of 14] imported patch test-shallow-clone
Nicolas Dumazet
nicdumz at gmail.com
Fri Jul 16 02:37:15 CDT 2010
On Fri, 16 Jul 2010 12:45:22 +0530
Vishakh H <vsh426 at gmail.com> wrote:
> # HG changeset patch
> # User Vishakh H <vsh426 at gmail.com>
> # Date 1279263210 -19800
> # Node ID d7263d7fca3c01a10da221dd2a5a91984bdaf30c
> # Parent d642d2f27fb25575d968ebee3870a2181a928a3e
> imported patch test-shallow-clone
You forgot to add a meaningful commit message on this one.
Please do it, that should be easy ;)
-Nicolas.
>
> diff --git a/tests/test-shallow-clone b/tests/test-shallow-clone
> new file mode 100755
> --- /dev/null
> +++ b/tests/test-shallow-clone
> @@ -0,0 +1,47 @@
> +#!/bin/sh
> +
> +commitbranch(){
> +for i in `seq 1 $1`; do
> +echo a >> a
> +hg ci -m'modify a' -q
> +done
> +}
> +hg init foo
> +cd foo
> +touch a
> +hg ci -Am'add a' -q
> +commitbranch 5
> +hg up 3 -q
> +echo a > a
> +commitbranch 3
> +echo % complete graph
> +hg glog --template '{rev}\n' --config extensions.graphlog=
> +
> +cd ..
> +hg clone -s 6 foo shallowfoo -q
> +echo % manifest index
> +hg debugindex shallowfoo/.hg/store/00manifest.i
> +echo % filelog a index
> +hg debugindex shallowfoo/.hg/store/data/a.i
> +cd foo
> +commitbranch 1
> +hg up 5 -q
> +commitbranch 2
> +
> +echo
> +echo % add changes in full clone and inspect revlogs
> +hg out ../shallowfoo --template '{rev}\n'
> +echo % manifest index
> +hg debugindex .hg/store/00manifest.i
> +echo % filelog a index
> +hg debugindex .hg/store/data/a.i
> +
> +echo
> +echo % pull changes to shallow clone and inspect revlogs
> +cd ../shallowfoo
> +hg pull -q
> +hg glog --template '{rev}\n' --config extensions.graphlog=
> +echo % manifest index
> +hg debugindex .hg/store/00manifest.i
> +echo % filelog a index
> +hg debugindex .hg/store/data/a.i
> diff --git a/tests/test-shallow-clone.out b/tests/test-shallow-clone.out
> new file mode 100644
> --- /dev/null
> +++ b/tests/test-shallow-clone.out
> @@ -0,0 +1,106 @@
> +% complete graph
> +@ 8
> +|
> +o 7
> +|
> +o 6
> +|
> +| o 5
> +| |
> +| o 4
> +|/
> +o 3
> +|
> +o 2
> +|
> +o 1
> +|
> +o 0
> +
> +% manifest index
> + rev offset length base linkrev nodeid p1 p2
> + 0 0 0 0 -1 eae75da4f8b8 000000000000 000000000000
> + 1 0 44 1 6 6685c070ae2a eae75da4f8b8 000000000000
> + 2 44 44 2 7 95f1d27b0665 6685c070ae2a 000000000000
> + 3 88 44 3 8 98aa691264db 95f1d27b0665 000000000000
> +% filelog a index
> + rev offset length base linkrev nodeid p1 p2
> + 0 0 0 0 -1 9be4d9d209a7 000000000000 000000000000
> + 1 0 5 1 6 112072a370d3 9be4d9d209a7 000000000000
> + 2 5 7 2 7 d9a4f98a8568 112072a370d3 000000000000
> + 3 12 9 3 8 adfe6440a0d4 d9a4f98a8568 000000000000
> +
> +% add changes in full clone and inspect revlogs
> +comparing with ../shallowfoo
> +searching for changes
> +9
> +10
> +11
> +% manifest index
> + rev offset length base linkrev nodeid p1 p2
> + 0 0 44 0 0 8515d4bfda76 000000000000 000000000000
> + 1 44 44 1 1 b1f982f045c8 8515d4bfda76 000000000000
> + 2 88 44 2 2 cb3d0039d4e1 b1f982f045c8 000000000000
> + 3 132 44 3 3 eae75da4f8b8 cb3d0039d4e1 000000000000
> + 4 176 44 4 4 d7257b72b4db eae75da4f8b8 000000000000
> + 5 220 44 5 5 99a40445b841 d7257b72b4db 000000000000
> + 6 264 44 6 6 6685c070ae2a eae75da4f8b8 000000000000
> + 7 308 44 7 7 95f1d27b0665 6685c070ae2a 000000000000
> + 8 352 44 8 8 98aa691264db 95f1d27b0665 000000000000
> + 9 396 44 9 9 3323f921f496 98aa691264db 000000000000
> + 10 440 44 10 10 10c033940905 99a40445b841 000000000000
> + 11 484 44 11 11 832bfa1ecdda 10c033940905 000000000000
> +% filelog a index
> + rev offset length base linkrev nodeid p1 p2
> + 0 0 0 0 0 b80de5d13875 000000000000 000000000000
> + 1 0 3 1 1 91f19eceef38 b80de5d13875 000000000000
> + 2 3 5 2 2 5b6c828b88e2 91f19eceef38 000000000000
> + 3 8 7 3 3 9be4d9d209a7 5b6c828b88e2 000000000000
> + 4 15 9 4 4 028336d3562a 9be4d9d209a7 000000000000
> + 5 24 11 5 5 3771b5cbc256 028336d3562a 000000000000
> + 6 35 5 6 6 112072a370d3 9be4d9d209a7 000000000000
> + 7 40 7 7 7 d9a4f98a8568 112072a370d3 000000000000
> + 8 47 9 8 8 adfe6440a0d4 d9a4f98a8568 000000000000
> + 9 56 11 9 9 ad0bbbbbe31f adfe6440a0d4 000000000000
> + 10 67 13 10 10 60e21c1fef54 3771b5cbc256 000000000000
> + 11 80 14 10 11 75da89b1f36b 60e21c1fef54 000000000000
> +
> +% pull changes to shallow clone and inspect revlogs
> +o 11
> +|
> +o 10
> +|
> +| o 9
> +| |
> +| @ 8
> +| |
> +| o 7
> +| |
> +| o 6
> +| |
> +o | 5
> +| |
> +o | 4
> +|/
> +o 3
> +|
> +o 2
> +|
> +o 1
> +|
> +o 0
> +
> +% manifest index
> + rev offset length base linkrev nodeid p1 p2
> + 0 0 0 0 -1 eae75da4f8b8 000000000000 000000000000
> + 1 0 44 1 6 6685c070ae2a eae75da4f8b8 000000000000
> + 2 44 44 2 7 95f1d27b0665 6685c070ae2a 000000000000
> + 3 88 44 3 8 98aa691264db 95f1d27b0665 000000000000
> + 4 132 44 4 9 3323f921f496 98aa691264db 000000000000
> +% filelog a index
> + rev offset length base linkrev nodeid p1 p2
> + 0 0 0 0 -1 9be4d9d209a7 000000000000 000000000000
> + 1 0 5 1 6 112072a370d3 9be4d9d209a7 000000000000
> + 2 5 7 2 7 d9a4f98a8568 112072a370d3 000000000000
> + 3 12 9 3 8 adfe6440a0d4 d9a4f98a8568 000000000000
> + 4 21 11 4 9 ad0bbbbbe31f adfe6440a0d4 000000000000
> _______________________________________________
> 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