annotate tests/test-treemanifest.t @ 25299:4f07fb1d7fbb

test-treemanifest: add globs for Windows
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 27 May 2015 12:14:10 -0400
parents 8545bd381504
children 20ad936ac5d2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
2 Set up repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
3
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
4 $ hg --config experimental.treemanifest=True init repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
5 $ cd repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
6
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
7 Requirements get set on init
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
8
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
9 $ grep treemanifest .hg/requires
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
10 treemanifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
11
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
12 Without directories, looks like any other repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
13
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
14 $ echo 0 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
15 $ echo 0 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
16 $ hg ci -Aqm initial
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
17 $ hg debugdata -m 0
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
18 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
19 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
20
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
21 Submanifest is stored in separate revlog
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
22
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
23 $ mkdir dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
24 $ echo 1 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
25 $ echo 1 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
26 $ echo 1 > e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
27 $ hg ci -Aqm 'add dir1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
28 $ hg debugdata -m 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
29 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
30 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
31 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44ed (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
32 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
33 $ hg debugdata --dir dir1 0
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
34 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
35 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
36
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
37 Can add nested directories
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
38
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
39 $ mkdir dir1/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
40 $ echo 2 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
41 $ echo 2 > dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
42 $ mkdir dir1/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
43 $ echo 2 > dir1/dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
44 $ echo 2 > dir1/dir2/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
45 $ hg ci -Aqm 'add dir1/dir1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
46 $ hg files -r .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
47 a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
48 b
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
49 dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
50 dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
51 dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
52 dir1/dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
53 dir1/dir2/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
54 dir1/dir2/b (glob)
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
55 e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
56
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
57 Revision is not created for unchanged directory
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
58
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
59 $ mkdir dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
60 $ echo 3 > dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
61 $ hg add dir2
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
62 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
63 $ hg debugindex --dir dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
64 $ 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
65 $ hg debugindex --dir dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
66 $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
67 $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
68
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
69 Removing directory does not create an revlog entry
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
70
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
71 $ hg rm dir1/dir1
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
72 removing dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
73 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
74 $ hg debugindex --dir dir1/dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
75 $ 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
76 $ hg debugindex --dir dir1/dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
77 $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
78 $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
79
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
80 Check that hg files (calls treemanifest.walk()) works
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
81 without loading all directory revlogs
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
82
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
83 $ hg co 'desc("add dir2")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
84 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
85 $ 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
86 $ hg files -r . dir1
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
87 dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
88 dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
89 dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
90 dir1/dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
91 dir1/dir2/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
92 dir1/dir2/b (glob)
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
93
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
94 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
95 without loading all directory revlogs
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
96
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
97 $ hg status --rev 'desc("add dir1")' --rev . dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
98 A dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
99 A dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
100 A dir1/dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
101 A dir1/dir2/b
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
102 $ 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
103
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
104 Merge creates 2-parent revision of directory revlog
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
105
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
106 $ echo 5 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
107 $ hg ci -Aqm 'modify dir1/a'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
108 $ hg co '.^'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
109 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
110 $ echo 6 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
111 $ hg ci -Aqm 'modify dir1/b'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
112 $ hg merge 'desc("modify dir1/a")'
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 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
115 $ hg ci -m 'conflict-free merge involving dir1/'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
116 $ cat dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
117 5
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
118 $ cat dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
119 6
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
120 $ hg debugindex --dir dir1
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
121 rev offset length base linkrev nodeid p1 p2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
122 0 0 54 0 1 8b3ffd73f901 000000000000 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
123 1 54 68 0 2 b66d046c644f 8b3ffd73f901 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
124 2 122 12 0 4 b87265673c8a b66d046c644f 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
125 3 134 95 0 5 aa5d3adcec72 b66d046c644f 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
126 4 229 81 0 6 e29b066b91ad b66d046c644f 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
127 5 310 107 5 7 a120ce2b83f5 e29b066b91ad aa5d3adcec72
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
128
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
129 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
130 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
131
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
132 $ hg co 'desc("add dir2")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
133 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
134 $ echo 8 > dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
135 $ hg ci -m 'modify dir2/a'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
136 created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
137
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
138 $ hg debugindex --dir dir2 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
139 $ hg merge 'desc("modify dir1/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
140 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
141 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
142 $ hg revert -r 'desc("modify dir2/a")' .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
143 reverting dir1/a (glob)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
144 $ 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
145 $ hg debugindex --dir dir2 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
146 $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
147 $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
148
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
149 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
150 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
151
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
152 $ hg co 'desc("modify dir2/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
153 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
154 $ hg debugindex --dir dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
155 $ hg merge 'desc("modify dir1/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
156 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
157 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
158 $ hg revert -r 'desc("modify dir1/a")' .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
159 reverting dir2/a (glob)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
160 $ hg ci -m 'merge, keeping parent 2'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
161 created new head
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
162 $ hg debugindex --dir dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
163 $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
164 $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
165
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
166 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
167
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
168 $ cd ..
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
169 $ hg init repo-flat
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
170 $ cd repo-flat
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 Create a few commits with flat manifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
173
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
174 $ echo 0 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
175 $ echo 0 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
176 $ echo 0 > e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
177 $ 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
178 > do
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
179 > mkdir $d
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
180 > echo 0 > $d/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
181 > echo 0 > $d/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
182 > done
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
183 $ hg ci -Aqm initial
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
184
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
185 $ echo 1 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
186 $ echo 1 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
187 $ echo 1 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
188 $ hg ci -Aqm 'modify on branch 1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
189
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
190 $ hg co 0
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
191 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
192 $ echo 2 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
193 $ echo 2 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
194 $ echo 2 > dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
195 $ hg ci -Aqm 'modify on branch 2'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
196
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
197 $ hg merge 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
198 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
199 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
200 $ 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
201
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
202 Create clone with tree manifests enabled
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
203
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
204 $ cd ..
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
205 $ 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
206 requesting all changes
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
207 adding changesets
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
208 adding manifests
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
209 adding file changes
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
210 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
211 updating to branch default
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
212 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
213 $ cd repo-mixed
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
214 $ test -f .hg/store/meta
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
215 [1]
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
216 $ grep treemanifest .hg/requires
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
217 treemanifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
218
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
219 Commit should store revlog per directory
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
220
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
221 $ hg co 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
222 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
223 $ echo 3 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
224 $ echo 3 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
225 $ echo 3 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
226 $ hg ci -m 'first tree'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
227 created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
228 $ find .hg/store/meta | sort
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
229 .hg/store/meta
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
230 .hg/store/meta/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
231 .hg/store/meta/dir1/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
232 .hg/store/meta/dir1/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
233 .hg/store/meta/dir1/dir1/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
234 .hg/store/meta/dir1/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
235 .hg/store/meta/dir1/dir2/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
236 .hg/store/meta/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
237 .hg/store/meta/dir2/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
238
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
239 Merge of two trees
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
240
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
241 $ hg co 2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
242 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
243 $ hg merge 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
244 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
245 (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
246 $ 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
247 created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
248 $ hg diff -r 3
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
249
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
250 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
251
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
252 $ hg debugindex -m
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
253 rev offset length base linkrev nodeid p1 p2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
254 0 0 80 0 0 40536115ed9e 000000000000 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
255 1 80 83 0 1 f3376063c255 40536115ed9e 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
256 2 163 103 0 2 5d9b9da231a2 40536115ed9e 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
257 3 266 83 0 3 d17d663cbd8a 5d9b9da231a2 f3376063c255
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
258 4 349 132 4 4 c05a51345f86 f3376063c255 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
259 5 481 110 4 5 82594b1f557d 5d9b9da231a2 f3376063c255
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
260
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
261
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
262 Status across flat/tree boundary should work
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
263
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
264 $ hg status --rev '.^' --rev .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
265 M a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
266 M dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
267 M dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
268
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
269
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
270 Turning off treemanifest config has no effect
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
271
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
272 $ hg debugindex .hg/store/meta/dir1/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
273 rev offset length base linkrev nodeid p1 p2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
274 0 0 125 0 4 63c9c0557d24 000000000000 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
275 1 125 109 0 5 23d12a1f6e0e 000000000000 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
276 $ echo 2 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
277 $ 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
278 $ hg debugindex .hg/store/meta/dir1/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
279 rev offset length base linkrev nodeid p1 p2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
280 0 0 125 0 4 63c9c0557d24 000000000000 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
281 1 125 109 0 5 23d12a1f6e0e 000000000000 000000000000
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
282 2 234 55 0 6 3cb2d87b4250 23d12a1f6e0e 000000000000
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
283
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
284 Create deeper repo with tree manifests.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
285
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
286 $ cd ..
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
287 $ hg --config experimental.treemanifest=True init deeprepo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
288 $ cd deeprepo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
289
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
290 $ mkdir a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
291 $ mkdir b
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
292 $ mkdir b/bar
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
293 $ mkdir b/bar/orange
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
294 $ mkdir b/bar/orange/fly
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
295 $ mkdir b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
296 $ mkdir b/foo/apple
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
297 $ mkdir b/foo/apple/bees
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
298
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
299 $ touch a/one.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
300 $ touch a/two.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
301 $ touch b/bar/fruits.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
302 $ touch b/bar/orange/fly/gnat.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
303 $ touch b/bar/orange/fly/housefly.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
304 $ touch b/foo/apple/bees/flower.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
305 $ touch c.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
306 $ touch d.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
307
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
308 $ hg ci -Aqm 'initial'
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
309
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
310 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
311 the files command with various parameters.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
312
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
313 Test files from the root.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
314
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
315 $ hg files -r .
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
316 a/one.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
317 a/two.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
318 b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
319 b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
320 b/bar/orange/fly/housefly.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
321 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
322 c.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
323 d.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
324
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
325 Test files for a subdirectory.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
326
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
327 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
328 $ hg files -r . b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
329 b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
330 b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
331 b/bar/orange/fly/housefly.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
332 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
333 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
334
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
335 Test files with just includes and excludes.
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 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
338 $ 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
339 $ mv .hg/store/meta/b/foo/apple/bees oldmf3
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
340 $ hg files -r . -I b/bar -X b/bar/orange/fly -I b/foo -X b/foo/apple/bees
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
341 b/bar/fruits.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
342 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
343 $ 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
344 $ 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
345
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
346 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
347
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
348 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
349 $ mv .hg/store/meta/b/foo oldmf2
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
350 $ hg files -r . -X b/foo b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
351 b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
352 b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
353 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
354 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
355 $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
356
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
357 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
358 including an unrelated directory.
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 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
361 $ mv .hg/store/meta/b/foo oldmf2
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
362 $ hg files -r . -I b/bar/orange -I a b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
363 b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
364 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
365 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
366 $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
367
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
368 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
369 within that.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
370
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
371 $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
372 $ mv .hg/store/meta/b/foo oldmf2
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
373 $ mv .hg/store/meta/b/bar/orange oldmf3
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
374 $ hg files -r . glob:**.txt -I b/bar -X b/bar/orange
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
375 b/bar/fruits.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
376 $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
377 $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
378 $ 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
379