Mercurial > hg > hg-fastimport
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 |
| rev | line source |
|---|---|
| 18 | 1 #!/bin/sh |
| 2 | |
| 3 # A simple dump: two commits, no marks, no blobs | |
| 4 | |
| 20 | 5 . $TESTDIR/fastimport-common |
| 18 | 6 |
| 7 cat > simple.dump <<__EOF__ | |
| 8 commit refs/heads/master | |
| 9 committer Example <example@example.org> 1200000000 +0000 | |
| 10 data 17 | |
| 11 initial revision | |
| 12 | |
| 13 M 644 inline file1 | |
| 14 data 14 | |
| 15 file 1 begins | |
| 16 | |
| 17 M 644 inline file2 | |
| 18 data 19 | |
| 19 this here be file2 | |
| 20 | |
| 21 commit refs/heads/master | |
| 22 committer Example <example@example.org> 1200000001 +0000 | |
| 23 data 11 | |
| 24 add a line | |
| 25 | |
| 26 M 644 inline file1 | |
| 27 data 23 | |
| 28 file 1 begins | |
| 29 new line | |
| 30 | |
| 31 __EOF__ | |
| 32 | |
| 33 set -e | |
| 34 rm -rf simple | |
| 35 echo "% importing" | |
| 36 hg init simple | |
| 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 | 39 |
| 40 # It's OK for the log to include changeset IDs, since the fastimport | |
| 41 # dump includes everything used to compute them, so they should be the | |
| 42 # same from run to run. | |
| 43 echo "% hg log" | |
| 44 hg log | |
| 45 | |
| 46 echo "% content of file1, rev 0" | |
| 47 hg cat -r0 file1 | |
| 48 | |
| 49 echo "% content of file2, rev 0" | |
| 50 hg cat -r0 file2 | |
| 51 | |
| 52 echo "% content of file1, rev 1" | |
| 53 hg cat -r1 file1 | |
| 54 | |
| 55 echo "% content of file2, rev 1" | |
| 56 hg cat -r1 file2 |
