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