##// END OF EJS Templates
py3: prove hg status works
Rishabh Madan -
r31524:935a1b11 default
parent child Browse files
Show More
@@ -1,114 +1,125 b''
1 #require py3exe
1 #require py3exe
2
2
3 This test helps in keeping a track on which commands we can run on
3 This test helps in keeping a track on which commands we can run on
4 Python 3 and see what kind of errors are coming up.
4 Python 3 and see what kind of errors are coming up.
5 The full traceback is hidden to have a stable output.
5 The full traceback is hidden to have a stable output.
6 $ HGBIN=`which hg`
6 $ HGBIN=`which hg`
7
7
8 $ for cmd in version debuginstall ; do
8 $ for cmd in version debuginstall ; do
9 > echo $cmd
9 > echo $cmd
10 > $PYTHON3 $HGBIN $cmd 2>&1 2>&1 | tail -1
10 > $PYTHON3 $HGBIN $cmd 2>&1 2>&1 | tail -1
11 > done
11 > done
12 version
12 version
13 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 debuginstall
14 debuginstall
15 no problems detected
15 no problems detected
16
16
17 #if test-repo
17 #if test-repo
18 Make a clone so that any features in the developer's .hg/hgrc that
18 Make a clone so that any features in the developer's .hg/hgrc that
19 might confuse Python 3 don't break this test. When we can do commit in
19 might confuse Python 3 don't break this test. When we can do commit in
20 Python 3, we'll stop doing this. We use e76ed1e480ef for the clone
20 Python 3, we'll stop doing this. We use e76ed1e480ef for the clone
21 because it has different files than 273ce12ad8f1, so we can test both
21 because it has different files than 273ce12ad8f1, so we can test both
22 `files` from dirstate and `files` loaded from a specific revision.
22 `files` from dirstate and `files` loaded from a specific revision.
23
23
24 $ hg clone -r e76ed1e480ef "`dirname "$TESTDIR"`" testrepo 2>&1 | tail -1
24 $ hg clone -r e76ed1e480ef "`dirname "$TESTDIR"`" testrepo 2>&1 | tail -1
25 15 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 15 files updated, 0 files merged, 0 files removed, 0 files unresolved
26
26
27 Test using -R, which exercises some URL code:
27 Test using -R, which exercises some URL code:
28 $ $PYTHON3 $HGBIN -R testrepo files -r 273ce12ad8f1 | tail -1
28 $ $PYTHON3 $HGBIN -R testrepo files -r 273ce12ad8f1 | tail -1
29 testrepo/tkmerge
29 testrepo/tkmerge
30
30
31 Now prove `hg files` is reading the whole manifest. We have to grep
31 Now prove `hg files` is reading the whole manifest. We have to grep
32 out some potential warnings that come from hgrc as yet.
32 out some potential warnings that come from hgrc as yet.
33 $ cd testrepo
33 $ cd testrepo
34 $ $PYTHON3 $HGBIN files -r 273ce12ad8f1
34 $ $PYTHON3 $HGBIN files -r 273ce12ad8f1
35 .hgignore
35 .hgignore
36 PKG-INFO
36 PKG-INFO
37 README
37 README
38 hg
38 hg
39 mercurial/__init__.py
39 mercurial/__init__.py
40 mercurial/byterange.py
40 mercurial/byterange.py
41 mercurial/fancyopts.py
41 mercurial/fancyopts.py
42 mercurial/hg.py
42 mercurial/hg.py
43 mercurial/mdiff.py
43 mercurial/mdiff.py
44 mercurial/revlog.py
44 mercurial/revlog.py
45 mercurial/transaction.py
45 mercurial/transaction.py
46 notes.txt
46 notes.txt
47 setup.py
47 setup.py
48 tkmerge
48 tkmerge
49
49
50 $ $PYTHON3 $HGBIN files -r 273ce12ad8f1 | wc -l
50 $ $PYTHON3 $HGBIN files -r 273ce12ad8f1 | wc -l
51 \s*14 (re)
51 \s*14 (re)
52 $ $PYTHON3 $HGBIN files | wc -l
52 $ $PYTHON3 $HGBIN files | wc -l
53 \s*15 (re)
53 \s*15 (re)
54
54
55 Test if log-like commands work:
55 Test if log-like commands work:
56
56
57 $ $PYTHON3 $HGBIN tip
57 $ $PYTHON3 $HGBIN tip
58 changeset: 10:e76ed1e480ef
58 changeset: 10:e76ed1e480ef
59 tag: tip
59 tag: tip
60 user: oxymoron@cinder.waste.org
60 user: oxymoron@cinder.waste.org
61 date: Tue May 03 23:37:43 2005 -0800
61 date: Tue May 03 23:37:43 2005 -0800
62 summary: Fix linking of changeset revs when merging
62 summary: Fix linking of changeset revs when merging
63
63
64
64
65 $ $PYTHON3 $HGBIN log -r0
65 $ $PYTHON3 $HGBIN log -r0
66 changeset: 0:9117c6561b0b
66 changeset: 0:9117c6561b0b
67 user: mpm@selenic.com
67 user: mpm@selenic.com
68 date: Tue May 03 13:16:10 2005 -0800
68 date: Tue May 03 13:16:10 2005 -0800
69 summary: Add back links from file revisions to changeset revisions
69 summary: Add back links from file revisions to changeset revisions
70
70
71 Test if `hg status` works:
72
73 $ mkdir a b a/1 b/1 b/2
74 $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2
75 $ $PYTHON3 $HGBIN status
76 ? a/1/in_a_1
77 ? a/in_a
78 ? b/1/in_b_1
79 ? b/2/in_b_2
80 ? b/in_b
81 ? in_root
71
82
72 $ cd ..
83 $ cd ..
73 #endif
84 #endif
74
85
75 Test if `hg config` works:
86 Test if `hg config` works:
76
87
77 $ $PYTHON3 $HGBIN config
88 $ $PYTHON3 $HGBIN config
78 defaults.backout=-d "0 0"
89 defaults.backout=-d "0 0"
79 defaults.commit=-d "0 0"
90 defaults.commit=-d "0 0"
80 defaults.shelve=--date "0 0"
91 defaults.shelve=--date "0 0"
81 defaults.tag=-d "0 0"
92 defaults.tag=-d "0 0"
82 devel.all-warnings=true
93 devel.all-warnings=true
83 largefiles.usercache=$TESTTMP/.cache/largefiles
94 largefiles.usercache=$TESTTMP/.cache/largefiles
84 ui.slash=True
95 ui.slash=True
85 ui.interactive=False
96 ui.interactive=False
86 ui.mergemarkers=detailed
97 ui.mergemarkers=detailed
87 ui.promptecho=True
98 ui.promptecho=True
88 web.address=localhost
99 web.address=localhost
89 web.ipv6=False
100 web.ipv6=False
90
101
91 $ cat > included-hgrc <<EOF
102 $ cat > included-hgrc <<EOF
92 > [extensions]
103 > [extensions]
93 > babar = imaginary_elephant
104 > babar = imaginary_elephant
94 > EOF
105 > EOF
95 $ cat >> $HGRCPATH <<EOF
106 $ cat >> $HGRCPATH <<EOF
96 > %include $TESTTMP/included-hgrc
107 > %include $TESTTMP/included-hgrc
97 > EOF
108 > EOF
98 $ $PYTHON3 $HGBIN version | tail -1
109 $ $PYTHON3 $HGBIN version | tail -1
99 *** failed to import extension babar from imaginary_elephant: *: 'imaginary_elephant' (glob)
110 *** failed to import extension babar from imaginary_elephant: *: 'imaginary_elephant' (glob)
100 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
111 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
101
112
102 $ rm included-hgrc
113 $ rm included-hgrc
103 $ touch included-hgrc
114 $ touch included-hgrc
104
115
105 Test bytes-ness of policy.policy with HGMODULEPOLICY
116 Test bytes-ness of policy.policy with HGMODULEPOLICY
106
117
107 $ HGMODULEPOLICY=py
118 $ HGMODULEPOLICY=py
108 $ export HGMODULEPOLICY
119 $ export HGMODULEPOLICY
109 $ $PYTHON3 `which hg` debuginstall 2>&1 2>&1 | tail -1
120 $ $PYTHON3 `which hg` debuginstall 2>&1 2>&1 | tail -1
110 no problems detected
121 no problems detected
111
122
112 `hg init` can create empty repos
123 `hg init` can create empty repos
113
124
114 $ $PYTHON3 `which hg` init emptyrepo
125 $ $PYTHON3 `which hg` init emptyrepo
General Comments 0
You need to be logged in to leave comments. Login now