Debian Codegraph @

tests/test-contrib-dumprevlog.t

raw
1 $ CONTRIBDIR="$TESTDIR/../contrib"
2
3 $ hg init repo-a
4 $ cd repo-a
5
6 $ echo this is file a > a
7 $ hg add a
8 $ hg commit -m first
9
10 $ echo adding to file a >> a
11 $ hg commit -m second
12
13 $ echo adding more to file a >> a
14 $ hg commit -m third
15 $ hg verify -q
16
17 Dumping revlog of file a to stdout:
18 $ "$PYTHON" "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i
19 file: .hg/store/data/a.i
20 node: 183d2312b35066fb6b3b449b84efc370d50993d0
21 linkrev: 0
22 parents: 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
23 length: 15
24 -start-
25 this is file a
26
27 -end-
28 node: b1047953b6e6b633c0d8197eaa5116fbdfd3095b
29 linkrev: 1
30 parents: 183d2312b35066fb6b3b449b84efc370d50993d0 0000000000000000000000000000000000000000
31 length: 32
32 -start-
33 this is file a
34 adding to file a
35
36 -end-
37 node: 8c4fd1f7129b8cdec6c7f58bf48fb5237a4030c1
38 linkrev: 2
39 parents: b1047953b6e6b633c0d8197eaa5116fbdfd3095b 0000000000000000000000000000000000000000
40 length: 54
41 -start-
42 this is file a
43 adding to file a
44 adding more to file a
45
46 -end-
47
48 Dump all revlogs to file repo.dump:
49
50 $ find .hg/store -name "*.i" | sort | xargs "$PYTHON" "$CONTRIBDIR/dumprevlog" > ../repo.dump
51 $ cd ..
52
53 Undumping into repo-b:
54
55 $ hg init repo-b
56 $ cd repo-b
57 $ "$PYTHON" "$CONTRIBDIR/undumprevlog" < ../repo.dump
58 .hg/store/00changelog.i
59 .hg/store/00manifest.i
60 .hg/store/data/a.i
61 $ cd ..
62
63 Rebuild fncache with clone --pull:
64
65 $ hg clone --pull -U repo-b repo-c
66 requesting all changes
67 adding changesets
68 adding manifests
69 adding file changes
70 added 3 changesets with 3 changes to 1 files
71 new changesets de1da620e7d8:46946d278c50
72
73 Verify:
74
75 $ hg -R repo-c verify -q
76
77 Compare repos:
78
79 $ hg -R repo-c incoming repo-a
80 comparing with repo-a
81 searching for changes
82 no changes found
83 [1]
84
85 $ hg -R repo-a incoming repo-c
86 comparing with repo-c
87 searching for changes
88 no changes found
89 [1]