author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
Sat, 03 Nov 2007 11:11:13 +0100 | |
changeset 5663 | 99fdef2e6793 |
parent 5538 | dc8fa3482a9a |
child 5698 | b63ef7b1441c |
permissions | -rwxr-xr-x |
5513
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 |
#!/bin/sh |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 |
"$TESTDIR/hghave" svn svn-bindings || exit 80 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 |
echo "[extensions]" >> $HGRCPATH |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 |
echo "convert = " >> $HGRCPATH |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 |
hg init a |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
10 |
echo a > a/a |
5538
dc8fa3482a9a
test-convert-svn-sink: test directory additions
Patrick Mezard <pmezard@gmail.com>
parents:
5513
diff
changeset
|
11 |
mkdir -p a/d1/d2 |
dc8fa3482a9a
test-convert-svn-sink: test directory additions
Patrick Mezard <pmezard@gmail.com>
parents:
5513
diff
changeset
|
12 |
echo b > a/d1/d2/b |
5513
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
13 |
echo % add |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
14 |
hg --cwd a ci -d '0 0' -A -m 'add a file' |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
15 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
16 |
echo a >> a/a |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
17 |
echo % modify |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
18 |
hg --cwd a ci -d '1 0' -m 'modify a file' |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
19 |
hg --cwd a tip -q |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
20 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
21 |
hg convert -d svn a |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
22 |
(cd a-hg-wc; svn up; svn st -v; svn log --xml -v --limit=2 | sed 's,<date>.*,<date/>,') |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
23 |
ls a a-hg-wc |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
24 |
cmp a/a a-hg-wc/a && echo same || echo different |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
25 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
26 |
hg --cwd a mv a b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
27 |
echo % rename |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
28 |
hg --cwd a ci -d '2 0' -m 'rename a file' |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
29 |
hg --cwd a tip -q |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
30 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
31 |
hg convert -d svn a |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
32 |
(cd a-hg-wc; svn up; svn st -v; svn log --xml -v --limit=1 | sed 's,<date>.*,<date/>,') |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
33 |
ls a a-hg-wc |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
34 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
35 |
hg --cwd a cp b c |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
36 |
echo % copy |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
37 |
hg --cwd a ci -d '3 0' -m 'copy a file' |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
38 |
hg --cwd a tip -q |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
39 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
40 |
hg convert -d svn a |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
41 |
(cd a-hg-wc; svn up; svn st -v; svn log --xml -v --limit=1 | sed 's,<date>.*,<date/>,') |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
42 |
ls a a-hg-wc |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
43 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
44 |
hg --cwd a rm b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
45 |
echo % remove |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
46 |
hg --cwd a ci -d '4 0' -m 'remove a file' |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
47 |
hg --cwd a tip -q |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
48 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
49 |
hg convert -d svn a |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
50 |
(cd a-hg-wc; svn up; svn st -v; svn log --xml -v --limit=1 | sed 's,<date>.*,<date/>,') |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
51 |
ls a a-hg-wc |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
52 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
53 |
chmod +x a/c |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
54 |
echo % executable |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
55 |
hg --cwd a ci -d '5 0' -m 'make a file executable' |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
56 |
hg --cwd a tip -q |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
57 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
58 |
hg convert -d svn a |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
59 |
(cd a-hg-wc; svn up; svn st -v; svn log --xml -v --limit=1 | sed 's,<date>.*,<date/>,') |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
60 |
test -x a-hg-wc/c && echo executable || echo not executable |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
61 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
62 |
echo % branchy history |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
63 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
64 |
hg init b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
65 |
echo base > b/b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
66 |
hg --cwd b ci -d '0 0' -Ambase |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
67 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
68 |
echo left-1 >> b/b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
69 |
echo left-1 > b/left-1 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
70 |
hg --cwd b ci -d '1 0' -Amleft-1 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
71 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
72 |
echo left-2 >> b/b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
73 |
echo left-2 > b/left-2 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
74 |
hg --cwd b ci -d '2 0' -Amleft-2 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
75 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
76 |
hg --cwd b up 0 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
77 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
78 |
echo right-1 >> b/b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
79 |
echo right-1 > b/right-1 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
80 |
hg --cwd b ci -d '3 0' -Amright-1 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
81 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
82 |
echo right-2 >> b/b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
83 |
echo right-2 > b/right-2 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
84 |
hg --cwd b ci -d '4 0' -Amright-2 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
85 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
86 |
hg --cwd b up -C 2 |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
87 |
hg --cwd b merge |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
88 |
hg --cwd b revert -r 2 b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
89 |
hg --cwd b ci -d '5 0' -m 'merge' |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
90 |
|
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
91 |
hg convert -d svn b |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
92 |
echo % expect 4 changes |
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
93 |
(cd b-hg-wc; svn up; svn st -v; svn log --xml -v | sed 's,<date>.*,<date/>,') |