##// END OF EJS Templates
tests: extract dumprevlog tests to own file...
Gregory Szorc -
r37425:567bddcb default
parent child Browse files
Show More
@@ -0,0 +1,101 b''
1 #require reporevlogstore
2
3 $ CONTRIBDIR="$TESTDIR/../contrib"
4
5 $ hg init repo-a
6 $ cd repo-a
7
8 $ echo this is file a > a
9 $ hg add a
10 $ hg commit -m first
11
12 $ echo adding to file a >> a
13 $ hg commit -m second
14
15 $ echo adding more to file a >> a
16 $ hg commit -m third
17 $ hg verify
18 checking changesets
19 checking manifests
20 crosschecking files in changesets and manifests
21 checking files
22 1 files, 3 changesets, 3 total revisions
23
24 Dumping revlog of file a to stdout:
25 $ $PYTHON "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i
26 file: .hg/store/data/a.i
27 node: 183d2312b35066fb6b3b449b84efc370d50993d0
28 linkrev: 0
29 parents: 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
30 length: 15
31 -start-
32 this is file a
33
34 -end-
35 node: b1047953b6e6b633c0d8197eaa5116fbdfd3095b
36 linkrev: 1
37 parents: 183d2312b35066fb6b3b449b84efc370d50993d0 0000000000000000000000000000000000000000
38 length: 32
39 -start-
40 this is file a
41 adding to file a
42
43 -end-
44 node: 8c4fd1f7129b8cdec6c7f58bf48fb5237a4030c1
45 linkrev: 2
46 parents: b1047953b6e6b633c0d8197eaa5116fbdfd3095b 0000000000000000000000000000000000000000
47 length: 54
48 -start-
49 this is file a
50 adding to file a
51 adding more to file a
52
53 -end-
54
55 Dump all revlogs to file repo.dump:
56
57 $ find .hg/store -name "*.i" | sort | xargs $PYTHON "$CONTRIBDIR/dumprevlog" > ../repo.dump
58 $ cd ..
59
60 Undumping into repo-b:
61
62 $ hg init repo-b
63 $ cd repo-b
64 $ $PYTHON "$CONTRIBDIR/undumprevlog" < ../repo.dump
65 .hg/store/00changelog.i
66 .hg/store/00manifest.i
67 .hg/store/data/a.i
68 $ cd ..
69
70 Rebuild fncache with clone --pull:
71
72 $ hg clone --pull -U repo-b repo-c
73 requesting all changes
74 adding changesets
75 adding manifests
76 adding file changes
77 added 3 changesets with 3 changes to 1 files
78 new changesets de1da620e7d8:46946d278c50
79
80 Verify:
81
82 $ hg -R repo-c verify
83 checking changesets
84 checking manifests
85 crosschecking files in changesets and manifests
86 checking files
87 1 files, 3 changesets, 3 total revisions
88
89 Compare repos:
90
91 $ hg -R repo-c incoming repo-a
92 comparing with repo-a
93 searching for changes
94 no changes found
95 [1]
96
97 $ hg -R repo-a incoming repo-c
98 comparing with repo-c
99 searching for changes
100 no changes found
101 [1]
@@ -2,108 +2,6 b' Set vars:'
2
2
3 $ CONTRIBDIR="$TESTDIR/../contrib"
3 $ CONTRIBDIR="$TESTDIR/../contrib"
4
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
107 Test simplemerge command:
5 Test simplemerge command:
108
6
109 $ cp "$CONTRIBDIR/simplemerge" .
7 $ cp "$CONTRIBDIR/simplemerge" .
General Comments 0
You need to be logged in to leave comments. Login now