annotate tests/test-fastimport-simple @ 47:7ff36dc9f0b1

Massive rework to use infrastructure provided by convert extension. fastimport no longer stages changes in the repository's working copy; instead, it now works like any other convert source: the imported history is kept in memory (except for file contents) and then processed by the 'convert' extension.
author Greg Ward <greg-hg@gerg.ca>
date Sat, 16 May 2009 12:57:22 -0400
parents 1fd08644b5ac
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
1 #!/bin/sh
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
2
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
3 # A simple dump: two commits, no marks, no blobs
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
4
20
1fd08644b5ac Factor out fastimport-common
Greg Ward <greg-hg@gerg.ca>
parents: 18
diff changeset
5 . $TESTDIR/fastimport-common
18
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
6
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
7 cat > simple.dump <<__EOF__
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
8 commit refs/heads/master
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
9 committer Example <example@example.org> 1200000000 +0000
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
10 data 17
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
11 initial revision
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
12
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
13 M 644 inline file1
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
14 data 14
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
15 file 1 begins
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
16
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
17 M 644 inline file2
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
18 data 19
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
19 this here be file2
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
20
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
21 commit refs/heads/master
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
22 committer Example <example@example.org> 1200000001 +0000
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
23 data 11
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
24 add a line
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
25
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
26 M 644 inline file1
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
27 data 23
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
28 file 1 begins
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
29 new line
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
30
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
31 __EOF__
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
32
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
33 set -e
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
34 rm -rf simple
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
35 echo "% importing"
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
36 hg init simple
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
37 cd simple
47
7ff36dc9f0b1 Massive rework to use infrastructure provided by convert extension.
Greg Ward <greg-hg@gerg.ca>
parents: 20
diff changeset
38 hg fastimport ../simple.dump | sed "s|$HGTMP|HGTMP|g"
18
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
39
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
40 # It's OK for the log to include changeset IDs, since the fastimport
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
41 # dump includes everything used to compute them, so they should be the
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
42 # same from run to run.
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
43 echo "% hg log"
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
44 hg log
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
45
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
46 echo "% content of file1, rev 0"
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
47 hg cat -r0 file1
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
48
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
49 echo "% content of file2, rev 0"
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
50 hg cat -r0 file2
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
51
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
52 echo "% content of file1, rev 1"
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
53 hg cat -r1 file1
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
54
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
55 echo "% content of file2, rev 1"
ae8dd2a2f102 Add the first two test scripts.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
56 hg cat -r1 file2