Mercurial > hg
annotate tests/test-dumprevlog @ 9161:e8b653a4b8da
doc: fixup font markup in man pages
This exposed a bug in rst2man where it neglects to escape a literal
backslash. A patch has been applied upstream, but not yet packaged in,
say, Debian unstable. A forward-compatible work-around has therefore
been put in place.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 16 Jul 2009 23:25:26 +0200 |
parents | 6c82beaaa11a |
children |
rev | line source |
---|---|
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
1 #!/bin/sh |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
2 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
3 CONTRIBDIR=$TESTDIR/../contrib |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
4 |
7229
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
5 echo % prepare repo-a |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
6 mkdir repo-a |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
7 cd repo-a |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
8 hg init |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
9 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
10 echo this is file a > a |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
11 hg add a |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7229
diff
changeset
|
12 hg commit -m first |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
13 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
14 echo adding to file a >> a |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7229
diff
changeset
|
15 hg commit -m second |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
16 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
17 echo adding more to file a >> a |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7229
diff
changeset
|
18 hg commit -m third |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
19 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
20 hg verify |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
21 |
7229
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
22 echo |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
23 echo % dumping revlog of file a to stdout |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
24 python $CONTRIBDIR/dumprevlog .hg/store/data/a.i |
7229
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
25 echo % dumprevlog done |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
26 |
7229
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
27 echo |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
28 echo % dump all revlogs to file repo.dump |
6516
7a6243bf209d
fixed missing sorting in test-dumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
6515
diff
changeset
|
29 find .hg/store -name "*.i" | sort | xargs python $CONTRIBDIR/dumprevlog > ../repo.dump |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
30 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
31 cd .. |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
32 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
33 mkdir repo-b |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
34 cd repo-b |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
35 hg init |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
36 |
7229
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
37 echo |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
38 echo % undumping into repo-b |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
39 python $CONTRIBDIR/undumprevlog < ../repo.dump |
7229
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
40 echo % undumping done |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
41 |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
42 cd .. |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
43 |
7229
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
44 echo |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
45 echo % clone --pull repo-b repo-c to rebuild fncache |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
46 hg clone --pull -U repo-b repo-c |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
47 |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
48 cd repo-c |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
49 |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
50 echo |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
51 echo % verify repo-c |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
52 hg verify |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
53 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
54 cd .. |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
55 |
7229
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
56 echo |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
57 echo % comparing repos |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
58 hg -R repo-c incoming repo-a |
7946503ec76e
introduce fncache repository layout
Adrian Buehlmann <adrian@cadifra.com>
parents:
6516
diff
changeset
|
59 hg -R repo-a incoming repo-c |
6465
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
60 |
9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff
changeset
|
61 exit 0 |