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