Mercurial > hg
comparison tests/test-contrib.t @ 37407:567bddcb4271
tests: extract dumprevlog tests to own file
And mark the test as requiring the revlog store.
Differential Revision: https://phab.mercurial-scm.org/D3091
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 04 Apr 2018 09:57:21 -0700 |
parents | acda1977210c |
children | 5abc47d4ca6b |
comparison
equal
deleted
inserted
replaced
37406:8c37c3220ebc | 37407:567bddcb4271 |
---|---|
1 Set vars: | 1 Set vars: |
2 | 2 |
3 $ CONTRIBDIR="$TESTDIR/../contrib" | 3 $ CONTRIBDIR="$TESTDIR/../contrib" |
4 | |
5 Prepare repo-a: | |
6 | |
7 $ hg init repo-a | |
8 $ cd repo-a | |
9 | |
10 $ echo this is file a > a | |
11 $ hg add a | |
12 $ hg commit -m first | |
13 | |
14 $ echo adding to file a >> a | |
15 $ hg commit -m second | |
16 | |
17 $ echo adding more to file a >> a | |
18 $ hg commit -m third | |
19 | |
20 $ hg verify | |
21 checking changesets | |
22 checking manifests | |
23 crosschecking files in changesets and manifests | |
24 checking files | |
25 1 files, 3 changesets, 3 total revisions | |
26 | |
27 Dumping revlog of file a to stdout: | |
28 | |
29 $ $PYTHON "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i | |
30 file: .hg/store/data/a.i | |
31 node: 183d2312b35066fb6b3b449b84efc370d50993d0 | |
32 linkrev: 0 | |
33 parents: 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 | |
34 length: 15 | |
35 -start- | |
36 this is file a | |
37 | |
38 -end- | |
39 node: b1047953b6e6b633c0d8197eaa5116fbdfd3095b | |
40 linkrev: 1 | |
41 parents: 183d2312b35066fb6b3b449b84efc370d50993d0 0000000000000000000000000000000000000000 | |
42 length: 32 | |
43 -start- | |
44 this is file a | |
45 adding to file a | |
46 | |
47 -end- | |
48 node: 8c4fd1f7129b8cdec6c7f58bf48fb5237a4030c1 | |
49 linkrev: 2 | |
50 parents: b1047953b6e6b633c0d8197eaa5116fbdfd3095b 0000000000000000000000000000000000000000 | |
51 length: 54 | |
52 -start- | |
53 this is file a | |
54 adding to file a | |
55 adding more to file a | |
56 | |
57 -end- | |
58 | |
59 Dump all revlogs to file repo.dump: | |
60 | |
61 $ find .hg/store -name "*.i" | sort | xargs $PYTHON "$CONTRIBDIR/dumprevlog" > ../repo.dump | |
62 $ cd .. | |
63 | |
64 Undumping into repo-b: | |
65 | |
66 $ hg init repo-b | |
67 $ cd repo-b | |
68 $ $PYTHON "$CONTRIBDIR/undumprevlog" < ../repo.dump | |
69 .hg/store/00changelog.i | |
70 .hg/store/00manifest.i | |
71 .hg/store/data/a.i | |
72 $ cd .. | |
73 | |
74 Rebuild fncache with clone --pull: | |
75 | |
76 $ hg clone --pull -U repo-b repo-c | |
77 requesting all changes | |
78 adding changesets | |
79 adding manifests | |
80 adding file changes | |
81 added 3 changesets with 3 changes to 1 files | |
82 new changesets de1da620e7d8:46946d278c50 | |
83 | |
84 Verify: | |
85 | |
86 $ hg -R repo-c verify | |
87 checking changesets | |
88 checking manifests | |
89 crosschecking files in changesets and manifests | |
90 checking files | |
91 1 files, 3 changesets, 3 total revisions | |
92 | |
93 Compare repos: | |
94 | |
95 $ hg -R repo-c incoming repo-a | |
96 comparing with repo-a | |
97 searching for changes | |
98 no changes found | |
99 [1] | |
100 | |
101 $ hg -R repo-a incoming repo-c | |
102 comparing with repo-c | |
103 searching for changes | |
104 no changes found | |
105 [1] | |
106 | 4 |
107 Test simplemerge command: | 5 Test simplemerge command: |
108 | 6 |
109 $ cp "$CONTRIBDIR/simplemerge" . | 7 $ cp "$CONTRIBDIR/simplemerge" . |
110 $ echo base > base | 8 $ echo base > base |