##// END OF EJS Templates
manifestcache: make sure the entry are ordered by access time...
marmoute -
r42112:5b77847b default
parent child Browse files
Show More
@@ -1,135 +1,144 b''
1 Source bundle was generated with the following script:
1 Source bundle was generated with the following script:
2
2
3 # hg init
3 # hg init
4 # echo a > a
4 # echo a > a
5 # ln -s a l
5 # ln -s a l
6 # hg ci -Ama -d'0 0'
6 # hg ci -Ama -d'0 0'
7 # mkdir b
7 # mkdir b
8 # echo a > b/a
8 # echo a > b/a
9 # chmod +x b/a
9 # chmod +x b/a
10 # hg ci -Amb -d'1 0'
10 # hg ci -Amb -d'1 0'
11
11
12 $ hg init
12 $ hg init
13 $ hg unbundle "$TESTDIR/bundles/test-manifest.hg"
13 $ hg unbundle "$TESTDIR/bundles/test-manifest.hg"
14 adding changesets
14 adding changesets
15 adding manifests
15 adding manifests
16 adding file changes
16 adding file changes
17 added 2 changesets with 3 changes to 3 files
17 added 2 changesets with 3 changes to 3 files
18 new changesets b73562a03cfe:5bdc995175ba (2 drafts)
18 new changesets b73562a03cfe:5bdc995175ba (2 drafts)
19 (run 'hg update' to get a working copy)
19 (run 'hg update' to get a working copy)
20
20
21 The next call is expected to return nothing:
21 The next call is expected to return nothing:
22
22
23 $ hg manifest
23 $ hg manifest
24
24
25 $ hg co
25 $ hg co
26 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
27
27
28 $ hg manifest
28 $ hg manifest
29 a
29 a
30 b/a
30 b/a
31 l
31 l
32
32
33 $ hg files -vr .
33 $ hg files -vr .
34 2 a
34 2 a
35 2 x b/a
35 2 x b/a
36 1 l l
36 1 l l
37 $ hg files -r . -X b
37 $ hg files -r . -X b
38 a
38 a
39 l
39 l
40 $ hg files -T '{path} {size} {flags}\n'
40 $ hg files -T '{path} {size} {flags}\n'
41 a 2
41 a 2
42 b/a 2 x
42 b/a 2 x
43 l 1 l
43 l 1 l
44 $ hg files -T '{path} {node|shortest}\n' -r.
44 $ hg files -T '{path} {node|shortest}\n' -r.
45 a 5bdc
45 a 5bdc
46 b/a 5bdc
46 b/a 5bdc
47 l 5bdc
47 l 5bdc
48
48
49 $ hg manifest -v
49 $ hg manifest -v
50 644 a
50 644 a
51 755 * b/a
51 755 * b/a
52 644 @ l
52 644 @ l
53 $ hg manifest -T '{path} {rev}\n'
53 $ hg manifest -T '{path} {rev}\n'
54 a 1
54 a 1
55 b/a 1
55 b/a 1
56 l 1
56 l 1
57
57
58 $ hg manifest --debug
58 $ hg manifest --debug
59 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
59 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
60 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
60 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
61 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
61 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
62
62
63 $ hg manifest -r 0
63 $ hg manifest -r 0
64 a
64 a
65 l
65 l
66
66
67 $ hg manifest -r 1
67 $ hg manifest -r 1
68 a
68 a
69 b/a
69 b/a
70 l
70 l
71
71
72 $ hg manifest -r tip
72 $ hg manifest -r tip
73 a
73 a
74 b/a
74 b/a
75 l
75 l
76
76
77 $ hg manifest tip
77 $ hg manifest tip
78 a
78 a
79 b/a
79 b/a
80 l
80 l
81
81
82 $ hg manifest --all
82 $ hg manifest --all
83 a
83 a
84 b/a
84 b/a
85 l
85 l
86
86
87 The next two calls are expected to abort:
87 The next two calls are expected to abort:
88
88
89 $ hg manifest -r 2
89 $ hg manifest -r 2
90 abort: unknown revision '2'!
90 abort: unknown revision '2'!
91 [255]
91 [255]
92
92
93 $ hg manifest -r tip tip
93 $ hg manifest -r tip tip
94 abort: please specify just one revision
94 abort: please specify just one revision
95 [255]
95 [255]
96
96
97 Testing the manifest full text cache utility
97 Testing the manifest full text cache utility
98 --------------------------------------------
98 --------------------------------------------
99
99
100 Reminder of the manifest log content
100 Reminder of the manifest log content
101
101
102 $ hg log --debug | grep 'manifest:'
102 $ hg log --debug | grep 'manifest:'
103 manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
103 manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
104 manifest: 0:fce2a30dedad1eef4da95ca1dc0004157aa527cf
104 manifest: 0:fce2a30dedad1eef4da95ca1dc0004157aa527cf
105
105
106 Showing the content of the caches after the above operations
106 Showing the content of the caches after the above operations
107
107
108 $ hg debugmanifestfulltextcache
108 $ hg debugmanifestfulltextcache
109 cache empty
109 cache empty
110
110
111 Adding a new persistent entry in the cache
111 Adding a new persistent entry in the cache
112
112
113 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
113 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
114
114
115 $ hg debugmanifestfulltextcache
115 $ hg debugmanifestfulltextcache
116 cache contains 1 manifest entries, in order of most to least recent:
116 cache contains 1 manifest entries, in order of most to least recent:
117 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
117 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
118 total cache data size 157 bytes, on-disk 157 bytes
118 total cache data size 157 bytes, on-disk 157 bytes
119
119
120 Check we don't duplicated entry (added from the debug command)
120 Check we don't duplicated entry (added from the debug command)
121
121
122 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
122 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
123 $ hg debugmanifestfulltextcache
123 $ hg debugmanifestfulltextcache
124 cache contains 1 manifest entries, in order of most to least recent:
124 cache contains 1 manifest entries, in order of most to least recent:
125 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
125 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
126 total cache data size 157 bytes, on-disk 157 bytes
126 total cache data size 157 bytes, on-disk 157 bytes
127
127
128 Adding a second entry
128 Adding a second entry
129
129
130 $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf
130 $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf
131 $ hg debugmanifestfulltextcache
131 $ hg debugmanifestfulltextcache
132 cache contains 2 manifest entries, in order of most to least recent:
132 cache contains 2 manifest entries, in order of most to least recent:
133 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
133 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
134 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
134 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
135 total cache data size 268 bytes, on-disk 268 bytes
135 total cache data size 268 bytes, on-disk 268 bytes
136
137 Accessing the initial entry again, refresh their order
138
139 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
140 $ hg debugmanifestfulltextcache
141 cache contains 2 manifest entries, in order of most to least recent:
142 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
143 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
144 total cache data size 268 bytes, on-disk 268 bytes
General Comments 0
You need to be logged in to leave comments. Login now