Mercurial > hg
comparison tests/test-treemanifest.t @ 25119:49c583ca48c4
treemanifest: add --dir option to debug{revlog,data,index}
It should be possible to debug the submanifest revlogs without having
to know where they are stored (in .hg/store/meta/), so let's add a
--dir option for this purpose.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 12 Apr 2015 23:51:06 -0700 |
parents | b5052fc73300 |
children | 1929d9c84028 |
comparison
equal
deleted
inserted
replaced
25118:e632a2429982 | 25119:49c583ca48c4 |
---|---|
28 $ hg debugdata -m 1 | 28 $ hg debugdata -m 1 |
29 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) | 29 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
30 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) | 30 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
31 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44ed (esc) | 31 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44ed (esc) |
32 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) | 32 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
33 $ hg debugdata .hg/store/meta/dir1/00manifest.i 0 | 33 $ hg debugdata --dir dir1 0 |
34 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) | 34 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
35 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) | 35 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
36 | 36 |
37 Can add nested directories | 37 Can add nested directories |
38 | 38 |
58 | 58 |
59 $ mkdir dir2 | 59 $ mkdir dir2 |
60 $ echo 3 > dir2/a | 60 $ echo 3 > dir2/a |
61 $ hg add dir2 | 61 $ hg add dir2 |
62 adding dir2/a | 62 adding dir2/a |
63 $ hg debugindex .hg/store/meta/dir1/00manifest.i > before | 63 $ hg debugindex --dir dir1 > before |
64 $ hg ci -qm 'add dir2' | 64 $ hg ci -qm 'add dir2' |
65 $ hg debugindex .hg/store/meta/dir1/00manifest.i > after | 65 $ hg debugindex --dir dir1 > after |
66 $ diff before after | 66 $ diff before after |
67 $ rm before after | 67 $ rm before after |
68 | 68 |
69 Removing directory does not create an revlog entry | 69 Removing directory does not create an revlog entry |
70 | 70 |
71 $ hg rm dir1/dir1 | 71 $ hg rm dir1/dir1 |
72 removing dir1/dir1/a | 72 removing dir1/dir1/a |
73 removing dir1/dir1/b | 73 removing dir1/dir1/b |
74 $ hg debugindex .hg/store/meta/dir1/dir1/00manifest.i > before | 74 $ hg debugindex --dir dir1/dir1 > before |
75 $ hg ci -qm 'remove dir1/dir1' | 75 $ hg ci -qm 'remove dir1/dir1' |
76 $ hg debugindex .hg/store/meta/dir1/dir1/00manifest.i > after | 76 $ hg debugindex --dir dir1/dir1 > after |
77 $ diff before after | 77 $ diff before after |
78 $ rm before after | 78 $ rm before after |
79 | 79 |
80 Check that hg files (calls treemanifest.walk()) works | 80 Check that hg files (calls treemanifest.walk()) works |
81 | 81 |
111 $ hg ci -m 'conflict-free merge involving dir1/' | 111 $ hg ci -m 'conflict-free merge involving dir1/' |
112 $ cat dir1/a | 112 $ cat dir1/a |
113 5 | 113 5 |
114 $ cat dir1/b | 114 $ cat dir1/b |
115 6 | 115 6 |
116 $ hg debugindex .hg/store/meta/dir1/00manifest.i | 116 $ hg debugindex --dir dir1 |
117 rev offset length base linkrev nodeid p1 p2 | 117 rev offset length base linkrev nodeid p1 p2 |
118 0 0 54 0 1 8b3ffd73f901 000000000000 000000000000 | 118 0 0 54 0 1 8b3ffd73f901 000000000000 000000000000 |
119 1 54 68 0 2 b66d046c644f 8b3ffd73f901 000000000000 | 119 1 54 68 0 2 b66d046c644f 8b3ffd73f901 000000000000 |
120 2 122 12 0 4 b87265673c8a b66d046c644f 000000000000 | 120 2 122 12 0 4 b87265673c8a b66d046c644f 000000000000 |
121 3 134 95 0 5 aa5d3adcec72 b66d046c644f 000000000000 | 121 3 134 95 0 5 aa5d3adcec72 b66d046c644f 000000000000 |
129 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 129 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
130 $ echo 8 > dir2/a | 130 $ echo 8 > dir2/a |
131 $ hg ci -m 'modify dir2/a' | 131 $ hg ci -m 'modify dir2/a' |
132 created new head | 132 created new head |
133 | 133 |
134 $ hg debugindex .hg/store/meta/dir2/00manifest.i > before | 134 $ hg debugindex --dir dir2 > before |
135 $ hg merge 'desc("modify dir1/a")' | 135 $ hg merge 'desc("modify dir1/a")' |
136 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 136 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
137 (branch merge, don't forget to commit) | 137 (branch merge, don't forget to commit) |
138 $ hg revert -r 'desc("modify dir2/a")' . | 138 $ hg revert -r 'desc("modify dir2/a")' . |
139 reverting dir1/a (glob) | 139 reverting dir1/a (glob) |
140 $ hg ci -m 'merge, keeping parent 1' | 140 $ hg ci -m 'merge, keeping parent 1' |
141 $ hg debugindex .hg/store/meta/dir2/00manifest.i > after | 141 $ hg debugindex --dir dir2 > after |
142 $ diff before after | 142 $ diff before after |
143 $ rm before after | 143 $ rm before after |
144 | 144 |
145 Merge keeping directory from parent 2 does not create revlog entry. (Note that | 145 Merge keeping directory from parent 2 does not create revlog entry. (Note that |
146 dir2's manifest does change, but only because dir2/a's filelog changes.) | 146 dir2's manifest does change, but only because dir2/a's filelog changes.) |
147 | 147 |
148 $ hg co 'desc("modify dir2/a")' | 148 $ hg co 'desc("modify dir2/a")' |
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
150 $ hg debugindex .hg/store/meta/dir1/00manifest.i > before | 150 $ hg debugindex --dir dir1 > before |
151 $ hg merge 'desc("modify dir1/a")' | 151 $ hg merge 'desc("modify dir1/a")' |
152 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 152 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
153 (branch merge, don't forget to commit) | 153 (branch merge, don't forget to commit) |
154 $ hg revert -r 'desc("modify dir1/a")' . | 154 $ hg revert -r 'desc("modify dir1/a")' . |
155 reverting dir2/a (glob) | 155 reverting dir2/a (glob) |
156 $ hg ci -m 'merge, keeping parent 2' | 156 $ hg ci -m 'merge, keeping parent 2' |
157 created new head | 157 created new head |
158 $ hg debugindex .hg/store/meta/dir1/00manifest.i > after | 158 $ hg debugindex --dir dir1 > after |
159 $ diff before after | 159 $ diff before after |
160 $ rm before after | 160 $ rm before after |
161 | 161 |
162 Create flat source repo for tests with mixed flat/tree manifests | 162 Create flat source repo for tests with mixed flat/tree manifests |
163 | 163 |