Mercurial > hg
comparison tests/test-flagprocessor.t @ 37436:9d4f09bfe3ec
simplestore: correctly implement flag processors
There were a couple of bugs around the implementation of
flags processing with the simple store. After these changes,
test-flagprocessor.t now passes!
test-flagprocessor.t was also updated to include explicit test
coverage that pushed data is as expected on the server.
The test extension used by test-flagprocessor.t has been updated
so it monkeypatches the object returned from repo.file() instead
of monkeypatching filelog.filelog. This allows it to work with
extensions that return custom types from repo.file().
The monkeypatching is rather hacky and probably is performance
prohibitive for real repos. We should probably come up with a
better mechanism for registering flag processors so monkeypatching
isn't needed.
Differential Revision: https://phab.mercurial-scm.org/D3116
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 04 Apr 2018 19:17:22 -0700 |
parents | 4441705b7111 |
children | 9d5ddf55415b |
comparison
equal
deleted
inserted
replaced
37435:0c1b895511b9 | 37436:9d4f09bfe3ec |
---|---|
85 searching for changes | 85 searching for changes |
86 adding changesets | 86 adding changesets |
87 adding manifests | 87 adding manifests |
88 adding file changes | 88 adding file changes |
89 added 7 changesets with 7 changes to 7 files | 89 added 7 changesets with 7 changes to 7 files |
90 | |
91 Ensure the data got to the server OK | |
92 | |
93 $ cd ../server | |
94 $ hg cat -r 6e48f4215d24 noop | |
95 [NOOP] | |
96 $ hg debugdata noop 0 | |
97 [NOOP] | |
98 | |
99 $ hg cat -r 6e48f4215d24 base64 | |
100 [BASE64] | |
101 $ hg debugdata base64 0 | |
102 W0JBU0U2NF0K (no-eol) | |
103 | |
104 $ hg cat -r 6e48f4215d24 gzip | |
105 [GZIP] | |
106 $ hg debugdata gzip 0 | |
107 x\x9c\x8bv\x8f\xf2\x0c\x88\xe5\x02\x00\x08\xc8\x01\xfd (no-eol) (esc) | |
108 | |
109 $ hg cat -r 6e48f4215d24 noop-base64 | |
110 [NOOP][BASE64] | |
111 $ hg debugdata noop-base64 0 | |
112 W05PT1BdW0JBU0U2NF0K (no-eol) | |
113 | |
114 $ hg cat -r 6e48f4215d24 noop-gzip | |
115 [NOOP][GZIP] | |
116 $ hg debugdata noop-gzip 0 | |
117 x\x9c\x8b\xf6\xf3\xf7\x0f\x88\x8dv\x8f\xf2\x0c\x88\xe5\x02\x00\x1dH\x03\xf1 (no-eol) (esc) | |
118 | |
119 $ hg cat -r 6e48f4215d24 base64-gzip | |
120 [BASE64][GZIP] | |
121 $ hg debugdata base64-gzip 0 | |
122 eJyLdnIMdjUziY12j/IMiOUCACLBBDo= (no-eol) | |
123 | |
124 $ hg cat -r 6e48f4215d24 base64-gzip-noop | |
125 [BASE64][GZIP][NOOP] | |
126 $ hg debugdata base64-gzip-noop 0 | |
127 eJyLdnIMdjUziY12j/IMiI328/cPiOUCAESjBi4= (no-eol) | |
90 | 128 |
91 # Initialize new client (not cloning) and setup extension | 129 # Initialize new client (not cloning) and setup extension |
92 $ cd .. | 130 $ cd .. |
93 $ hg init client2 | 131 $ hg init client2 |
94 $ cd client2 | 132 $ cd client2 |
195 | 233 |
196 $ hg update 2 -q | 234 $ hg update 2 -q |
197 $ echo '[BASE64]a-bit-longer-branching' > base64 | 235 $ echo '[BASE64]a-bit-longer-branching' > base64 |
198 $ hg commit -q -m branching | 236 $ hg commit -q -m branching |
199 | 237 |
238 #if repobundlerepo | |
200 $ hg bundle --base 1 bundle.hg | 239 $ hg bundle --base 1 bundle.hg |
201 4 changesets found | 240 4 changesets found |
202 $ hg --config extensions.strip= strip -r 2 --no-backup --force -q | 241 $ hg --config extensions.strip= strip -r 2 --no-backup --force -q |
203 $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 | 242 $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 |
204 5 branching | 243 5 branching |
251 0 base64-0 | 290 0 base64-0 |
252 base64 | 1 + | 291 base64 | 1 + |
253 1 files changed, 1 insertions(+), 0 deletions(-) | 292 1 files changed, 1 insertions(+), 0 deletions(-) |
254 | 293 |
255 $ rm bundle.hg bundle-again.hg | 294 $ rm bundle.hg bundle-again.hg |
295 #endif | |
256 | 296 |
257 # TEST: hg status | 297 # TEST: hg status |
258 | 298 |
259 $ hg status | 299 $ hg status |
260 $ hg diff | 300 $ hg diff |