Show More
@@ -0,0 +1,14 b'' | |||||
|
1 | #!/usr/bin/env python3 | |||
|
2 | # | |||
|
3 | # A tool to help producing large and poorly compressible files | |||
|
4 | # | |||
|
5 | # Usage: | |||
|
6 | # $TESTDIR/seq.py 1000 | $TESTDIR/sha256line.py > my-file.txt | |||
|
7 | ||||
|
8 | ||||
|
9 | import hashlib | |||
|
10 | import sys | |||
|
11 | ||||
|
12 | ||||
|
13 | for line in sys.stdin: | |||
|
14 | print(hashlib.sha256(line.encode('utf8')).hexdigest()) |
@@ -255,3 +255,4 b' 27055614b68538576fb0439007009acf93fe0a49' | |||||
255 | 26c57e7a0890b96e2c473b394de380d6753c9230 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmVcykAZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVoGeC/0Uvynfd4xJMSa3ef4lOrw3l0PsOMzLwcITC5b4SlMfo8sHDq1Vr169z/IvI/FhJ8LmK/Spg7OK6TkqJ33fOmpnKZji8oCstM8q0P6xZh55RIE4St8Px/TuC99HvB41sPgcBDQf/dfvXqUKHImxH5C21p93AkvdCie9sdeYzy23VSn1URBBRkfToB6U7QDvktiKE4Hy/mJolNd0FlTOrRiD7K4bzstaLZP8kO1gJQPCPBjqN8glXN/arebcdu8zD7sE22JZA87pJljY7Wy3P6O1zRol2qDPCBshK2zDbrljyOaKR10ciHUBJV0V11nK6xIZ4XE2N4xes3fYlBNsudHXvLutCv40e1VDVjRe2X6ayRZCnKkYI0s4oTl9oFo5olrsfeC5+b/exqB8oTCCqmMFdz3/QFO7/pQ3xck2XaWucG+o3R/y91t6Uy+5LPtIOsR5IevvPIiebpQgIMJkOIRrz5j59U+MafTSGfaDel/niPISQPWZ9T0ORS6q9uNRHCo= |
|
255 | 26c57e7a0890b96e2c473b394de380d6753c9230 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmVcykAZHGFscGhhcmVAcmFw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FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmXKNjoZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVhW9DACokMQuCQ6QzyrgXmAFwcg0czClQ7lJBfV+IHKk1oRmVWUj1jifKI2S3+BU1RgBO7FiG9r6NFOdCiL78VJN0W3YlBPW+Mp8joBkXGOyFiob4MI0w7Up04LLdVtvms2eEuAH7XVcRgbgWOcU6aTwcenYXMVkenhGShbKJBZU7ogAbu/y156bTmhuj3SVxUvmgtvXEACwHnPgdEdIPlssf7dDm6XHWhAU+60I2L5ECl7dEYZe2b5NwEvaHdWVjY+BEeVzrPvAjTaOP18HBtzawhf4PAEpBOwy5hX+k/EVaMMWLzCeF56vWfZXl+2AXDNQ3KIfmgZbRfJSGBA/VAxVob6bt/qRwj0vDIy52wgceITyZVnpynp9MS0sQ5rslyzNoPA6v4nWSPYXyorp22TY6hL5TyyF9cyyXoyNgtwvIzjFUqNnLQK1Qxqo1Pq0Au5nT2eJVWzUTD9znsYNuMKunlSyQwM9shjP78tLmVE/5IplcXq1cEXBwjyk30u6cBziPS8= |
@@ -271,3 +271,4 b' 27055614b68538576fb0439007009acf93fe0a49' | |||||
271 | 26c57e7a0890b96e2c473b394de380d6753c9230 6.6 |
|
271 | 26c57e7a0890b96e2c473b394de380d6753c9230 6.6 | |
272 | 71bd09bebbe36a09569cbfb388f371433360056b 6.6.1 |
|
272 | 71bd09bebbe36a09569cbfb388f371433360056b 6.6.1 | |
273 | 136902b3a95db38854ebaf5198a627641065c2ea 6.6.2 |
|
273 | 136902b3a95db38854ebaf5198a627641065c2ea 6.6.2 | |
|
274 | 3fd1efb3ad124e6686c0fb66e6943cd8aeea5681 6.6.3 |
@@ -3680,7 +3680,7 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
3680 |
|
3680 | |||
3681 | wopts = logcmdutil.walkopts( |
|
3681 | wopts = logcmdutil.walkopts( | |
3682 | pats=pats, |
|
3682 | pats=pats, | |
3683 | opts=opts, |
|
3683 | opts=pycompat.byteskwargs(opts), | |
3684 | revspec=opts['rev'], |
|
3684 | revspec=opts['rev'], | |
3685 | include_pats=opts['include'], |
|
3685 | include_pats=opts['include'], | |
3686 | exclude_pats=opts['exclude'], |
|
3686 | exclude_pats=opts['exclude'], |
@@ -1,4 +1,13 b'' | |||||
1 |
= Mercurial 6.6. |
|
1 | = Mercurial 6.6.3 = | |
|
2 | ||||
|
3 | * tests: don't use "status" operand of dd in test-censor.t (issue6858) | |||
|
4 | * tests: make sha256line.py available for all tests | |||
|
5 | * tests: use sha256line.py instead of /dev/random in test-censor.t (issue6858) | |||
|
6 | * tests: fix nondeterministic test failure in test-contrib-perf.t | |||
|
7 | * rust-changelog: don't panic on empty file lists | |||
|
8 | * grep: restore usage of --include/--exclude options | |||
|
9 | ||||
|
10 | = Mercurial 6.6.2 = | |||
2 |
|
11 | |||
3 | * histedit: remove superfluous echo() and endwin() calls (issue6859) |
|
12 | * histedit: remove superfluous echo() and endwin() calls (issue6859) | |
4 | * persistent-nodemap: avoid writing nodemap for empty revlog |
|
13 | * persistent-nodemap: avoid writing nodemap for empty revlog |
@@ -5,10 +5,11 b' use crate::revlog::{Revlog, RevlogEntry,' | |||||
5 | use crate::utils::hg_path::HgPath; |
|
5 | use crate::utils::hg_path::HgPath; | |
6 | use crate::vfs::Vfs; |
|
6 | use crate::vfs::Vfs; | |
7 | use crate::{Graph, GraphError, RevlogOpenOptions, UncheckedRevision}; |
|
7 | use crate::{Graph, GraphError, RevlogOpenOptions, UncheckedRevision}; | |
8 | use itertools::Itertools; |
|
8 | use itertools::{Either, Itertools}; | |
9 | use std::ascii::escape_default; |
|
9 | use std::ascii::escape_default; | |
10 | use std::borrow::Cow; |
|
10 | use std::borrow::Cow; | |
11 | use std::fmt::{Debug, Formatter}; |
|
11 | use std::fmt::{Debug, Formatter}; | |
|
12 | use std::iter; | |||
12 |
|
13 | |||
13 | /// A specialized `Revlog` to work with changelog data format. |
|
14 | /// A specialized `Revlog` to work with changelog data format. | |
14 | pub struct Changelog { |
|
15 | pub struct Changelog { | |
@@ -230,9 +231,15 b" impl<'changelog> ChangelogRevisionData<'" | |||||
230 |
|
231 | |||
231 | /// The files changed in this revision. |
|
232 | /// The files changed in this revision. | |
232 | pub fn files(&self) -> impl Iterator<Item = &HgPath> { |
|
233 | pub fn files(&self) -> impl Iterator<Item = &HgPath> { | |
233 |
|
|
234 | if self.timestamp_end == self.files_end { | |
234 | .split(|b| b == &b'\n') |
|
235 | Either::Left(iter::empty()) | |
235 | .map(HgPath::new) |
|
236 | } else { | |
|
237 | Either::Right( | |||
|
238 | self.bytes[self.timestamp_end + 1..self.files_end] | |||
|
239 | .split(|b| b == &b'\n') | |||
|
240 | .map(HgPath::new), | |||
|
241 | ) | |||
|
242 | } | |||
236 | } |
|
243 | } | |
237 |
|
244 | |||
238 | /// The change description. |
|
245 | /// The change description. | |
@@ -360,4 +367,12 b' message",' | |||||
360 | ); |
|
367 | ); | |
361 | Ok(()) |
|
368 | Ok(()) | |
362 | } |
|
369 | } | |
|
370 | ||||
|
371 | #[test] | |||
|
372 | fn test_empty_files_list() { | |||
|
373 | assert!(ChangelogRevisionData::null() | |||
|
374 | .files() | |||
|
375 | .collect_vec() | |||
|
376 | .is_empty()); | |||
|
377 | } | |||
363 | } |
|
378 | } |
@@ -316,7 +316,7 b' Can censor enough revision to move back ' | |||||
316 | rev-count data-size inl type target |
|
316 | rev-count data-size inl type target | |
317 | 8 ??? no file target (glob) (revlogv2 !) |
|
317 | 8 ??? no file target (glob) (revlogv2 !) | |
318 | 8 ??? yes file target (glob) (revlogv1 !) |
|
318 | 8 ??? yes file target (glob) (revlogv1 !) | |
319 | $ cat /dev/rand?m | dd status=none count=200 | f --hexdump > target |
|
319 | $ $TESTDIR/seq.py 4000 | $TESTDIR/sha256line.py > target | |
320 | $ hg ci -m 'add 100k passwords' |
|
320 | $ hg ci -m 'add 100k passwords' | |
321 | $ H2=`hg id --debug -i` |
|
321 | $ H2=`hg id --debug -i` | |
322 | $ C5=$H2 |
|
322 | $ C5=$H2 |
@@ -525,6 +525,23 b' Test wdir' | |||||
525 | port2:2147483647:deport |
|
525 | port2:2147483647:deport | |
526 | port2:2147483647:wport |
|
526 | port2:2147483647:wport | |
527 |
|
527 | |||
|
528 | Testing include/exclude | |||
|
529 | ||||
|
530 | $ hg cp port tort | |||
|
531 | $ hg grep port -X tort | |||
|
532 | port:export | |||
|
533 | port:vaportight | |||
|
534 | port:import/export | |||
|
535 | port2:export | |||
|
536 | port2:vaportight | |||
|
537 | port2:import/export | |||
|
538 | port2:deport | |||
|
539 | port2:wport | |||
|
540 | $ hg grep port -I tort | |||
|
541 | tort:export | |||
|
542 | tort:vaportight | |||
|
543 | tort:import/export | |||
|
544 | ||||
528 | $ cd .. |
|
545 | $ cd .. | |
529 | $ hg init t2 |
|
546 | $ hg init t2 | |
530 | $ cd t2 |
|
547 | $ cd t2 |
@@ -10,20 +10,13 b' basic setup' | |||||
10 | > [debug] |
|
10 | > [debug] | |
11 | > revlog.debug-delta=yes |
|
11 | > revlog.debug-delta=yes | |
12 | > EOF |
|
12 | > EOF | |
13 | $ cat << EOF >> sha256line.py |
|
|||
14 | > # a way to quickly produce file of significant size and poorly compressable content. |
|
|||
15 | > import hashlib |
|
|||
16 | > import sys |
|
|||
17 | > for line in sys.stdin: |
|
|||
18 | > print(hashlib.sha256(line.encode('utf8')).hexdigest()) |
|
|||
19 | > EOF |
|
|||
20 |
|
13 | |||
21 | $ hg init base-repo |
|
14 | $ hg init base-repo | |
22 | $ cd base-repo |
|
15 | $ cd base-repo | |
23 |
|
16 | |||
24 | create a "large" file |
|
17 | create a "large" file | |
25 |
|
18 | |||
26 |
$ $TESTDIR/seq.py 1000 | $ |
|
19 | $ $TESTDIR/seq.py 1000 | $TESTDIR/sha256line.py > my-file.txt | |
27 | $ hg add my-file.txt |
|
20 | $ hg add my-file.txt | |
28 | $ hg commit -m initial-commit |
|
21 | $ hg commit -m initial-commit | |
29 | DBG-DELTAS: FILELOG:my-file.txt: rev=0: delta-base=0 * (glob) |
|
22 | DBG-DELTAS: FILELOG:my-file.txt: rev=0: delta-base=0 * (glob) | |
@@ -32,7 +25,7 b' create a "large" file' | |||||
32 |
|
25 | |||
33 | Add more change at the end of the file |
|
26 | Add more change at the end of the file | |
34 |
|
27 | |||
35 |
$ $TESTDIR/seq.py 1001 1200 | $ |
|
28 | $ $TESTDIR/seq.py 1001 1200 | $TESTDIR/sha256line.py >> my-file.txt | |
36 | $ hg commit -m "large-change" |
|
29 | $ hg commit -m "large-change" | |
37 | DBG-DELTAS: FILELOG:my-file.txt: rev=1: delta-base=0 * (glob) |
|
30 | DBG-DELTAS: FILELOG:my-file.txt: rev=1: delta-base=0 * (glob) | |
38 | DBG-DELTAS: MANIFESTLOG: * (glob) |
|
31 | DBG-DELTAS: MANIFESTLOG: * (glob) | |
@@ -273,7 +266,7 b' We build a very different file content t' | |||||
273 |
|
266 | |||
274 | $ hg -R peer-bad-delta-with-full update 'desc("merge")' --quiet |
|
267 | $ hg -R peer-bad-delta-with-full update 'desc("merge")' --quiet | |
275 | $ ($TESTDIR/seq.py 2000 2100; $TESTDIR/seq.py 500 510; $TESTDIR/seq.py 3000 3050) \ |
|
268 | $ ($TESTDIR/seq.py 2000 2100; $TESTDIR/seq.py 500 510; $TESTDIR/seq.py 3000 3050) \ | |
276 |
> | $ |
|
269 | > | $TESTDIR/sha256line.py > peer-bad-delta-with-full/my-file.txt | |
277 | $ hg -R peer-bad-delta-with-full commit -m 'trigger-full' |
|
270 | $ hg -R peer-bad-delta-with-full commit -m 'trigger-full' | |
278 | DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 * (glob) |
|
271 | DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 * (glob) | |
279 | DBG-DELTAS: MANIFESTLOG: * (glob) |
|
272 | DBG-DELTAS: MANIFESTLOG: * (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now