##// END OF EJS Templates
Make test-convert-mtn pass on systems where mtn add -R uses different order
Thomas Arendsen Hein -
r6873:39b4db2e default
parent child Browse files
Show More
@@ -1,89 +1,89 b''
1 1 #!/bin/sh
2 2
3 3 "$TESTDIR/hghave" mtn || exit 80
4 4
5 5 # Monotone directory is called .monotone on *nix and monotone
6 6 # on Windows. Having a variable here ease test patching.
7 7 mtndir=.monotone
8 8 echo "[extensions]" >> $HGRCPATH
9 9 echo "convert=" >> $HGRCPATH
10 10 echo 'hgext.graphlog =' >> $HGRCPATH
11 11
12 12 HOME=`pwd`/do_not_use_HOME_mtn; export HOME
13 13 # Windows version of monotone home
14 14 APPDATA=$HOME; export APPDATA
15 15
16 16 echo % tedious monotone keys configuration
17 17 # The /dev/null redirection is necessary under Windows, or
18 18 # it complains about home directory permissions
19 19 mtn --quiet genkey test@selenic.com 1>/dev/null 2>&1 <<EOF
20 20 passphrase
21 21 passphrase
22 22 EOF
23 23 cat >> $HOME/$mtndir/monotonerc <<EOF
24 24 function get_passphrase(keypair_id)
25 25 return "passphrase"
26 26 end
27 27 EOF
28 28
29 29 echo % create monotone repository
30 30 mtn db init --db=repo.mtn
31 31 mtn --db=repo.mtn --branch=com.selenic.test setup workingdir
32 32 cd workingdir
33 33 echo a > a
34 34 mkdir dir
35 35 echo b > dir/b
36 36 python -c 'file("bin", "wb").write("a\\x00b")'
37 37 echo c > c
38 38 mtn add a dir/b c bin
39 39 mtn ci -m initialize
40 40 echo % update monotone working directory
41 41 mtn mv a dir/a
42 42 echo a >> dir/a
43 43 echo b >> dir/b
44 44 mtn drop c
45 45 python -c 'file("bin", "wb").write("b\\x00c")'
46 46 mtn ci -m update1
47 47 cd ..
48 48
49 49 echo % convert once
50 50 hg convert -s mtn repo.mtn
51 51
52 52 cd workingdir
53 53 echo e > e
54 54 mtn add e
55 55 mtn drop dir/b
56 56 mtn mv bin bin2
57 57 mtn ci -m 'update2 "with" quotes'
58 58 # Test directory move
59 59 mtn mv dir dir2
60 60 mtn ci -m movedir
61 61 # Test directory removal with empty directory
62 62 mkdir dir2/dir
63 63 mkdir dir2/dir/subdir
64 64 echo f > dir2/dir/subdir/f
65 65 mkdir dir2/dir/emptydir
66 mtn add -R dir2/dir
66 mtn add --quiet -R dir2/dir
67 67 mtn ci -m emptydir
68 68 mtn drop -R dir2/dir
69 69 mtn ci -m dropdirectory
70 70 cd ..
71 71
72 72 echo % convert incrementally
73 73 hg convert -s mtn repo.mtn
74 74
75 75 glog()
76 76 {
77 77 hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@"
78 78 }
79 79
80 80 cd repo.mtn-hg
81 81 hg up -C
82 82 glog
83 83 echo % manifest
84 84 hg manifest
85 85 echo % contents
86 86 cat dir2/a
87 87 test -d dir2/dir && echo 'removed dir2/dir is still there!'
88 88 exit 0
89 89
@@ -1,72 +1,68 b''
1 1 % tedious monotone keys configuration
2 2 % create monotone repository
3 3 mtn: adding a to workspace manifest
4 4 mtn: adding bin to workspace manifest
5 5 mtn: adding c to workspace manifest
6 6 mtn: adding dir to workspace manifest
7 7 mtn: adding dir/b to workspace manifest
8 8 mtn: beginning commit on branch 'com.selenic.test'
9 9 mtn: committed revision 803ef0bf815e35b951dbd4310acd1e45e675016e
10 10 % update monotone working directory
11 11 mtn: skipping dir, already accounted for in workspace
12 12 mtn: renaming a to dir/a in workspace manifest
13 13 mtn: dropping c from workspace manifest
14 14 mtn: beginning commit on branch 'com.selenic.test'
15 15 mtn: committed revision 4daf60753d6fe21a06ce5f716303fe55fd6d3a56
16 16 % convert once
17 17 assuming destination repo.mtn-hg
18 18 initializing destination repo.mtn-hg repository
19 19 scanning source...
20 20 sorting...
21 21 converting...
22 22 1 initialize
23 23 0 update1
24 24 mtn: adding e to workspace manifest
25 25 mtn: dropping dir/b from workspace manifest
26 26 mtn: renaming bin to bin2 in workspace manifest
27 27 mtn: beginning commit on branch 'com.selenic.test'
28 28 mtn: committed revision 6c6977a6ef609ec80e40779f89dbd2772c96de62
29 29 mtn: renaming dir to dir2 in workspace manifest
30 30 mtn: beginning commit on branch 'com.selenic.test'
31 31 mtn: committed revision 5de5abe7c15eae70cf3acdda23c9c319ea50c1af
32 mtn: adding dir2/dir to workspace manifest
33 mtn: adding dir2/dir/emptydir to workspace manifest
34 mtn: adding dir2/dir/subdir to workspace manifest
35 mtn: adding dir2/dir/subdir/f to workspace manifest
36 32 mtn: beginning commit on branch 'com.selenic.test'
37 33 mtn: committed revision 27a423be1e406595cc57f50f42a8790fa0a93d8e
38 34 mtn: dropping dir2/dir/subdir/f from workspace manifest
39 35 mtn: dropping dir2/dir/subdir from workspace manifest
40 36 mtn: dropping dir2/dir/emptydir from workspace manifest
41 37 mtn: dropping dir2/dir from workspace manifest
42 38 mtn: beginning commit on branch 'com.selenic.test'
43 39 mtn: committed revision ba57ba5ac63178529d37fa8a2a1a012fc0e42047
44 40 % convert incrementally
45 41 assuming destination repo.mtn-hg
46 42 scanning source...
47 43 sorting...
48 44 converting...
49 45 3 update2 "with" quotes
50 46 2 movedir
51 47 1 emptydir
52 48 0 dropdirectory
53 49 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 50 @ 5 "dropdirectory" files: dir2/dir/subdir/f
55 51 |
56 52 o 4 "emptydir" files: dir2/dir/subdir/f
57 53 |
58 54 o 3 "movedir" files: dir/a dir2/a
59 55 |
60 56 o 2 "update2 "with" quotes" files: bin bin2 dir/b e
61 57 |
62 58 o 1 "update1" files: a bin c dir/a dir/b
63 59 |
64 60 o 0 "initialize" files: a bin c dir/b
65 61
66 62 % manifest
67 63 bin2
68 64 dir2/a
69 65 e
70 66 % contents
71 67 a
72 68 a
General Comments 0
You need to be logged in to leave comments. Login now