annotate tests/test-treemanifest.t @ 27938:cabac7dfc621 stable

exchange: set 'treemanifest' param on pushed changegroups too In 5c0fd878779c (treemanifests: set bundle2 part parameter indicating treemanifest, 2016-01-08), I didn't realize I had to set the parameter separately for getbundle and unbundle. Having the parameter there on push allows us to push to an empty repo and have the requirements updated correctly.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 22 Jan 2016 16:31:50 -0800
parents 1289a122cf3f
children ca8d2b73155d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
1 $ cat << EOF >> $HGRCPATH
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
2 > [format]
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
3 > usegeneraldelta=yes
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
4 > EOF
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
5
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
6 Set up repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
7
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
8 $ hg --config experimental.treemanifest=True init repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
9 $ cd repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
10
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
11 Requirements get set on init
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
12
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
13 $ grep treemanifest .hg/requires
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
14 treemanifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
15
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
16 Without directories, looks like any other repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
17
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
18 $ echo 0 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
19 $ echo 0 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
20 $ hg ci -Aqm initial
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
21 $ hg debugdata -m 0
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
22 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
23 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
24
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
25 Submanifest is stored in separate revlog
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
26
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
27 $ mkdir dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
28 $ echo 1 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
29 $ echo 1 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
30 $ echo 1 > e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
31 $ hg ci -Aqm 'add dir1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
32 $ hg debugdata -m 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
33 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
34 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
35 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc)
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
36 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
37 $ hg debugdata --dir dir1 0
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
38 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
39 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
40
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
41 Can add nested directories
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
42
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
43 $ mkdir dir1/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
44 $ echo 2 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
45 $ echo 2 > dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
46 $ mkdir dir1/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
47 $ echo 2 > dir1/dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
48 $ echo 2 > dir1/dir2/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
49 $ hg ci -Aqm 'add dir1/dir1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
50 $ hg files -r .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
51 a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
52 b
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
53 dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
54 dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
55 dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
56 dir1/dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
57 dir1/dir2/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
58 dir1/dir2/b (glob)
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
59 e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
60
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
61 Revision is not created for unchanged directory
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
62
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
63 $ mkdir dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
64 $ echo 3 > dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
65 $ hg add dir2
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
66 adding dir2/a (glob)
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
67 $ hg debugindex --dir dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
68 $ hg ci -qm 'add dir2'
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
69 $ hg debugindex --dir dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
70 $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
71 $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
72
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
73 Removing directory does not create an revlog entry
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
74
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
75 $ hg rm dir1/dir1
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
76 removing dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
77 removing dir1/dir1/b (glob)
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
78 $ hg debugindex --dir dir1/dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
79 $ hg ci -qm 'remove dir1/dir1'
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
80 $ hg debugindex --dir dir1/dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
81 $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
82 $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
83
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
84 Check that hg files (calls treemanifest.walk()) works
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
85 without loading all directory revlogs
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
86
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
87 $ hg co 'desc("add dir2")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
88 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
89 $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
90 $ hg files -r . dir1
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
91 dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
92 dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
93 dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
94 dir1/dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
95 dir1/dir2/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
96 dir1/dir2/b (glob)
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
97
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
98 Check that status between revisions works (calls treemanifest.matches())
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
99 without loading all directory revlogs
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
100
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
101 $ hg status --rev 'desc("add dir1")' --rev . dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
102 A dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
103 A dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
104 A dir1/dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
105 A dir1/dir2/b
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
106 $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
107
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
108 Merge creates 2-parent revision of directory revlog
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
109
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
110 $ echo 5 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
111 $ hg ci -Aqm 'modify dir1/a'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
112 $ hg co '.^'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
114 $ echo 6 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
115 $ hg ci -Aqm 'modify dir1/b'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
116 $ hg merge 'desc("modify dir1/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
118 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
119 $ hg ci -m 'conflict-free merge involving dir1/'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
120 $ cat dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
121 5
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
122 $ cat dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
123 6
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
124 $ hg debugindex --dir dir1
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
125 rev offset length delta linkrev nodeid p1 p2
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
126 0 0 54 -1 1 8b3ffd73f901 000000000000 000000000000
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
127 1 54 68 0 2 68e9d057c5a8 8b3ffd73f901 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
128 2 122 12 1 4 4698198d2624 68e9d057c5a8 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
129 3 134 55 1 5 44844058ccce 68e9d057c5a8 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
130 4 189 55 1 6 bf3d9b744927 68e9d057c5a8 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
131 5 244 55 4 7 dde7c0af2a03 bf3d9b744927 44844058ccce
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
132
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
133 Merge keeping directory from parent 1 does not create revlog entry. (Note that
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
134 dir1's manifest does change, but only because dir1/a's filelog changes.)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
135
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
136 $ hg co 'desc("add dir2")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
137 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
138 $ echo 8 > dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
139 $ hg ci -m 'modify dir2/a'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
140 created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
141
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
142 $ hg debugindex --dir dir2 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
143 $ hg merge 'desc("modify dir1/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
144 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
145 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
146 $ hg revert -r 'desc("modify dir2/a")' .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
147 reverting dir1/a (glob)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
148 $ hg ci -m 'merge, keeping parent 1'
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
149 $ hg debugindex --dir dir2 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
150 $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
151 $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
152
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
153 Merge keeping directory from parent 2 does not create revlog entry. (Note that
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
154 dir2's manifest does change, but only because dir2/a's filelog changes.)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
155
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
156 $ hg co 'desc("modify dir2/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
157 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
158 $ hg debugindex --dir dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
159 $ hg merge 'desc("modify dir1/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
160 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
161 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
162 $ hg revert -r 'desc("modify dir1/a")' .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
163 reverting dir2/a (glob)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
164 $ hg ci -m 'merge, keeping parent 2'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
165 created new head
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
166 $ hg debugindex --dir dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
167 $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
168 $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
169
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
170 Create flat source repo for tests with mixed flat/tree manifests
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
171
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
172 $ cd ..
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
173 $ hg init repo-flat
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
174 $ cd repo-flat
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
175
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
176 Create a few commits with flat manifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
177
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
178 $ echo 0 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
179 $ echo 0 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
180 $ echo 0 > e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
181 $ for d in dir1 dir1/dir1 dir1/dir2 dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
182 > do
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
183 > mkdir $d
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
184 > echo 0 > $d/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
185 > echo 0 > $d/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
186 > done
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
187 $ hg ci -Aqm initial
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
188
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
189 $ echo 1 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
190 $ echo 1 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
191 $ echo 1 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
192 $ hg ci -Aqm 'modify on branch 1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
193
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
194 $ hg co 0
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
195 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
196 $ echo 2 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
197 $ echo 2 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
198 $ echo 2 > dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
199 $ hg ci -Aqm 'modify on branch 2'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
200
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
201 $ hg merge 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
202 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
203 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
204 $ hg ci -m 'merge of flat manifests to new flat manifest'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
205
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
206 Create clone with tree manifests enabled
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
207
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
208 $ cd ..
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
209 $ hg clone --pull --config experimental.treemanifest=1 repo-flat repo-mixed
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
210 requesting all changes
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
211 adding changesets
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
212 adding manifests
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
213 adding file changes
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
214 added 4 changesets with 17 changes to 11 files
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
215 updating to branch default
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
216 11 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
217 $ cd repo-mixed
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
218 $ test -f .hg/store/meta
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
219 [1]
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
220 $ grep treemanifest .hg/requires
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
221 treemanifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
222
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
223 Commit should store revlog per directory
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
224
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
225 $ hg co 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
226 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
227 $ echo 3 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
228 $ echo 3 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
229 $ echo 3 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
230 $ hg ci -m 'first tree'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
231 created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
232 $ find .hg/store/meta | sort
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
233 .hg/store/meta
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
234 .hg/store/meta/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
235 .hg/store/meta/dir1/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
236 .hg/store/meta/dir1/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
237 .hg/store/meta/dir1/dir1/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
238 .hg/store/meta/dir1/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
239 .hg/store/meta/dir1/dir2/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
240 .hg/store/meta/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
241 .hg/store/meta/dir2/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
242
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
243 Merge of two trees
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
244
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
245 $ hg co 2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
246 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
247 $ hg merge 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
248 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
249 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
250 $ hg ci -m 'merge of flat manifests to new tree manifest'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
251 created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
252 $ hg diff -r 3
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
253
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
254 Parent of tree root manifest should be flat manifest, and two for merge
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
255
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
256 $ hg debugindex -m
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
257 rev offset length delta linkrev nodeid p1 p2
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
258 0 0 80 -1 0 40536115ed9e 000000000000 000000000000
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
259 1 80 83 0 1 f3376063c255 40536115ed9e 000000000000
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
260 2 163 89 0 2 5d9b9da231a2 40536115ed9e 000000000000
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
261 3 252 83 2 3 d17d663cbd8a 5d9b9da231a2 f3376063c255
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
262 4 335 124 1 4 51e32a8c60ee f3376063c255 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
263 5 459 126 2 5 cc5baa78b230 5d9b9da231a2 f3376063c255
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
264
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
265
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
266 Status across flat/tree boundary should work
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
267
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
268 $ hg status --rev '.^' --rev .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
269 M a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
270 M dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
271 M dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
272
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
273
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
274 Turning off treemanifest config has no effect
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
275
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
276 $ hg debugindex .hg/store/meta/dir1/00manifest.i
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
277 rev offset length delta linkrev nodeid p1 p2
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
278 0 0 127 -1 4 064927a0648a 000000000000 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
279 1 127 111 0 5 25ecb8cb8618 000000000000 000000000000
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
280 $ echo 2 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
281 $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
282 $ hg debugindex .hg/store/meta/dir1/00manifest.i
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
283 rev offset length delta linkrev nodeid p1 p2
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
284 0 0 127 -1 4 064927a0648a 000000000000 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
285 1 127 111 0 5 25ecb8cb8618 000000000000 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
286 2 238 55 1 6 5b16163a30c6 25ecb8cb8618 000000000000
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
287
27930
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
288 Stripping and recovering changes should work
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
289
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
290 $ hg st --change tip
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
291 M dir1/a
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
292 $ hg --config extensions.strip= strip tip
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
293 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
294 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg (glob)
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
295 $ hg unbundle -q .hg/strip-backup/*
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
296 $ hg st --change tip
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
297 M dir1/a
7cbb3a01fa38 repair: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27752
diff changeset
298
27931
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
299 Shelving and unshelving should work
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
300
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
301 $ echo foo >> dir1/a
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
302 $ hg --config extensions.shelve= shelve
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
303 shelved as default
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
304 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
305 $ hg --config extensions.shelve= unshelve
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
306 unshelving change 'default'
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
307 $ hg diff --nodates
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
308 diff -r 708a273da119 dir1/a
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
309 --- a/dir1/a
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
310 +++ b/dir1/a
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
311 @@ -1,1 +1,2 @@
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
312 1
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
313 +foo
1289a122cf3f shelve: use cg3 for treemanifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 27930
diff changeset
314
27938
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
315 Pushing from treemanifest repo to an empty repo makes that a treemanifest repo
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
316
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
317 $ cd ..
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
318 $ hg init empty-repo
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
319 $ cat << EOF >> empty-repo/.hg/hgrc
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
320 > [experimental]
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
321 > changegroup3=yes
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
322 > EOF
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
323 $ grep treemanifest empty-repo/.hg/requires
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
324 [1]
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
325 $ hg push -R repo -r 0 empty-repo
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
326 pushing to empty-repo
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
327 searching for changes
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
328 adding changesets
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
329 adding manifests
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
330 adding file changes
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
331 added 1 changesets with 2 changes to 2 files
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
332 $ grep treemanifest empty-repo/.hg/requires
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
333 treemanifest
cabac7dfc621 exchange: set 'treemanifest' param on pushed changegroups too
Martin von Zweigbergk <martinvonz@google.com>
parents: 27931
diff changeset
334
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
335 Create deeper repo with tree manifests.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
336
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
337 $ hg --config experimental.treemanifest=True init deeprepo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
338 $ cd deeprepo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
339
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
340 $ mkdir a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
341 $ mkdir b
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
342 $ mkdir b/bar
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
343 $ mkdir b/bar/orange
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
344 $ mkdir b/bar/orange/fly
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
345 $ mkdir b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
346 $ mkdir b/foo/apple
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
347 $ mkdir b/foo/apple/bees
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
348
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
349 $ touch a/one.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
350 $ touch a/two.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
351 $ touch b/bar/fruits.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
352 $ touch b/bar/orange/fly/gnat.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
353 $ touch b/bar/orange/fly/housefly.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
354 $ touch b/foo/apple/bees/flower.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
355 $ touch c.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
356 $ touch d.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
357
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
358 $ hg ci -Aqm 'initial'
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
359
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
360 We'll see that visitdir works by removing some treemanifest revlogs and running
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
361 the files command with various parameters.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
362
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
363 Test files from the root.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
364
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
365 $ hg files -r .
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
366 a/one.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
367 a/two.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
368 b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
369 b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
370 b/bar/orange/fly/housefly.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
371 b/foo/apple/bees/flower.py (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
372 c.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
373 d.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
374
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
375 Excludes with a glob should not exclude everything from the glob's root
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
376
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
377 $ hg files -r . -X 'b/fo?' b
25398
633d07045494 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25362
diff changeset
378 b/bar/fruits.txt (glob)
633d07045494 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25362
diff changeset
379 b/bar/orange/fly/gnat.py (glob)
633d07045494 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25362
diff changeset
380 b/bar/orange/fly/housefly.txt (glob)
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
381
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
382 Test files for a subdirectory.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
383
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
384 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
385 $ hg files -r . b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
386 b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
387 b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
388 b/bar/orange/fly/housefly.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
389 b/foo/apple/bees/flower.py (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
390 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
391
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
392 Test files with just includes and excludes.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
393
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
394 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
395 $ mv .hg/store/meta/b/bar/orange/fly oldmf2
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
396 $ mv .hg/store/meta/b/foo/apple/bees oldmf3
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
397 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
398 b/bar/fruits.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
399 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
400 $ mv oldmf2 .hg/store/meta/b/bar/orange/fly
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
401 $ mv oldmf3 .hg/store/meta/b/foo/apple/bees
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
402
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
403 Test files for a subdirectory, excluding a directory within it.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
404
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
405 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
406 $ mv .hg/store/meta/b/foo oldmf2
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
407 $ hg files -r . -X path:b/foo b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
408 b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
409 b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
410 b/bar/orange/fly/housefly.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
411 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
412 $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
413
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
414 Test files for a sub directory, including only a directory within it, and
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
415 including an unrelated directory.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
416
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
417 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
418 $ mv .hg/store/meta/b/foo oldmf2
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
419 $ hg files -r . -I path:b/bar/orange -I path:a b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
420 b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
421 b/bar/orange/fly/housefly.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
422 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
423 $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
424
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
425 Test files for a pattern, including a directory, and excluding a directory
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
426 within that.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
427
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
428 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
429 $ mv .hg/store/meta/b/foo oldmf2
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
430 $ mv .hg/store/meta/b/bar/orange oldmf3
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
431 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
432 b/bar/fruits.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
433 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
434 $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
435 $ mv oldmf3 .hg/store/meta/b/bar/orange
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
436
27432
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
437 Add some more changes to the deep repo
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
438 $ echo narf >> b/bar/fruits.txt
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
439 $ hg ci -m narf
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
440 $ echo troz >> b/bar/orange/fly/gnat.py
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
441 $ hg ci -m troz
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
442
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
443 Test cloning a treemanifest repo over http.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
444 $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
445 $ cat hg.pid >> $DAEMON_PIDS
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
446 $ cd ..
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
447 We can clone even with the knob turned off and we'll get a treemanifest repo.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
448 $ hg clone --config experimental.treemanifest=False \
27752
29cfc474c5fd changegroup3: introduce experimental.changegroup3 boolean config
Martin von Zweigbergk <martinvonz@google.com>
parents: 27432
diff changeset
449 > --config experimental.changegroup3=True \
27432
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
450 > http://localhost:$HGPORT deepclone
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
451 requesting all changes
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
452 adding changesets
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
453 adding manifests
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
454 adding file changes
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
455 added 3 changesets with 10 changes to 8 files
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
456 updating to branch default
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
457 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
458 No server errors.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
459 $ cat deeprepo/errors.log
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
460 requires got updated to include treemanifest
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
461 $ cat deepclone/.hg/requires | grep treemanifest
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
462 treemanifest
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
463 Tree manifest revlogs exist.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
464 $ find deepclone/.hg/store/meta | sort
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
465 deepclone/.hg/store/meta
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
466 deepclone/.hg/store/meta/a
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
467 deepclone/.hg/store/meta/a/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
468 deepclone/.hg/store/meta/b
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
469 deepclone/.hg/store/meta/b/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
470 deepclone/.hg/store/meta/b/bar
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
471 deepclone/.hg/store/meta/b/bar/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
472 deepclone/.hg/store/meta/b/bar/orange
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
473 deepclone/.hg/store/meta/b/bar/orange/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
474 deepclone/.hg/store/meta/b/bar/orange/fly
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
475 deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
476 deepclone/.hg/store/meta/b/foo
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
477 deepclone/.hg/store/meta/b/foo/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
478 deepclone/.hg/store/meta/b/foo/apple
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
479 deepclone/.hg/store/meta/b/foo/apple/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
480 deepclone/.hg/store/meta/b/foo/apple/bees
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
481 deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
482 Verify passes.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
483 $ cd deepclone
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
484 $ hg verify
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
485 checking changesets
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
486 checking manifests
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
487 crosschecking files in changesets and manifests
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
488 checking files
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
489 8 files, 3 changesets, 10 total revisions
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
490 $ cd ..