@@ -7,23 +7,27 @@ test_description='Test remote-helper import and export commands'
7
7
8
8
. ./test-lib.sh
9
9
10
- if test_have_prereq PYTHON && " $PYTHON_PATH " -c '
10
+ if ! test_have_prereq PYTHON ; then
11
+ skip_all=' skipping git-remote-hg tests, python not available'
12
+ test_done
13
+ fi
14
+
15
+ " $PYTHON_PATH " -c '
11
16
import sys
12
17
if sys.hexversion < 0x02040000:
13
18
sys.exit(1)
14
- '
15
- then
16
- # Requires Python 2.4 or newer
17
- test_set_prereq PYTHON_24
18
- fi
19
+ ' || {
20
+ skip_all=' skipping git-remote-hg tests, python version < 2.4'
21
+ test_done
22
+ }
19
23
20
24
compare_refs () {
21
25
git --git-dir=" $1 /.git" rev-parse --verify $2 > expect &&
22
26
git --git-dir=" $3 /.git" rev-parse --verify $4 > actual &&
23
27
test_cmp expect actual
24
28
}
25
29
26
- test_expect_success PYTHON_24 ' setup repository' '
30
+ test_expect_success ' setup repository' '
27
31
git init --bare server/.git &&
28
32
git clone server public &&
29
33
(cd public &&
@@ -33,47 +37,47 @@ test_expect_success PYTHON_24 'setup repository' '
33
37
git push origin master)
34
38
'
35
39
36
- test_expect_success PYTHON_24 ' cloning from local repo' '
40
+ test_expect_success ' cloning from local repo' '
37
41
git clone "testgit::${PWD}/server" localclone &&
38
42
test_cmp public/file localclone/file
39
43
'
40
44
41
- test_expect_success PYTHON_24 ' cloning from remote repo' '
45
+ test_expect_success ' cloning from remote repo' '
42
46
git clone "testgit::file://${PWD}/server" clone &&
43
47
test_cmp public/file clone/file
44
48
'
45
49
46
- test_expect_success PYTHON_24 ' create new commit on remote' '
50
+ test_expect_success ' create new commit on remote' '
47
51
(cd public &&
48
52
echo content >>file &&
49
53
git commit -a -m two &&
50
54
git push)
51
55
'
52
56
53
- test_expect_success PYTHON_24 ' pulling from local repo' '
57
+ test_expect_success ' pulling from local repo' '
54
58
(cd localclone && git pull) &&
55
59
test_cmp public/file localclone/file
56
60
'
57
61
58
- test_expect_success PYTHON_24 ' pulling from remote remote' '
62
+ test_expect_success ' pulling from remote remote' '
59
63
(cd clone && git pull) &&
60
64
test_cmp public/file clone/file
61
65
'
62
66
63
- test_expect_success PYTHON_24 ' pushing to local repo' '
67
+ test_expect_success ' pushing to local repo' '
64
68
(cd localclone &&
65
69
echo content >>file &&
66
70
git commit -a -m three &&
67
71
git push) &&
68
72
compare_refs localclone HEAD server HEAD
69
73
'
70
74
71
- test_expect_success PYTHON_24 ' synch with changes from localclone' '
75
+ test_expect_success ' synch with changes from localclone' '
72
76
(cd clone &&
73
77
git pull)
74
78
'
75
79
76
- test_expect_success PYTHON_24 ' pushing remote local repo' '
80
+ test_expect_success ' pushing remote local repo' '
77
81
(cd clone &&
78
82
echo content >>file &&
79
83
git commit -a -m four &&
0 commit comments