Mercurial > hg-stable
annotate tests/test-narrow-sparse.t @ 41147:eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
This patch adds tests for doing a narrow clone when client has both sparse and
narrow enabled. As shown by this patch, we can see that the narrow clone has
sparse enabled which we does not want here. Upcoming patch will fix this.
Also while writing tests, I realized we don't have a flag to list the current
sparse profile.
Differential Revision: https://phab.mercurial-scm.org/D5478
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Mon, 24 Dec 2018 15:01:47 +0300 |
parents | |
children | 8eaf693b1409 |
rev | line source |
---|---|
41147
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
1 Testing interaction of sparse and narrow when both are enabled on the client |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
2 side and we do a non-ellipsis clone |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
3 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
4 #testcases tree flat |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
5 $ . "$TESTDIR/narrow-library.sh" |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
6 $ cat << EOF >> $HGRCPATH |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
7 > [extensions] |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
8 > sparse = |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
9 > EOF |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
10 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
11 #if tree |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
12 $ cat << EOF >> $HGRCPATH |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
13 > [experimental] |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
14 > treemanifest = 1 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
15 > EOF |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
16 #endif |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
17 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
18 $ hg init master |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
19 $ cd master |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
20 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
21 $ mkdir inside |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
22 $ echo 'inside' > inside/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
23 $ hg add inside/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
24 $ hg commit -m 'add inside' |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
25 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
26 $ mkdir widest |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
27 $ echo 'widest' > widest/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
28 $ hg add widest/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
29 $ hg commit -m 'add widest' |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
30 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
31 $ mkdir outside |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
32 $ echo 'outside' > outside/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
33 $ hg add outside/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
34 $ hg commit -m 'add outside' |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
35 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
36 $ cd .. |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
37 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
38 narrow clone the inside file |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
39 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
40 $ hg clone --narrow ssh://user@dummy/master narrow --include inside/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
41 requesting all changes |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
42 adding changesets |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
43 adding manifests |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
44 adding file changes |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
45 added 3 changesets with 1 changes to 1 files |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
46 new changesets *:* (glob) |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
47 updating to branch default |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
49 $ cd narrow |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
50 $ hg tracked |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
51 I path:inside/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
52 $ hg files |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
53 inside/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
54 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
55 XXX: we should not have sparse enabled |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
56 $ cat .hg/sparse |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
57 [include] |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
58 inside/f |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
59 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
60 $ cat .hg/requires |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
61 dotencode |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
62 exp-sparse |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
63 fncache |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
64 generaldelta |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
65 narrowhg-experimental |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
66 revlogv1 |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
67 sparserevlog |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
68 store |
eb172f9c208c
tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
69 treemanifest (tree !) |