##// END OF EJS Templates
py3: prove hg tip works
Yuya Nishihara -
r31450:b3b4c487 default
parent child Browse files
Show More
@@ -1,80 +1,91
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
55 Test if `hg tip` works:
56
57 $ $PYTHON3 $HGBIN tip
58 changeset: 10:e76ed1e480ef
59 tag: tip
60 user: oxymoron@cinder.waste.org
61 date: Tue May 03 23:37:43 2005 -0800
62 summary: Fix linking of changeset revs when merging
63
64
54 65 $ cd ..
55 66 #endif
56 67
57 68 $ cat > included-hgrc <<EOF
58 69 > [extensions]
59 70 > babar = imaginary_elephant
60 71 > EOF
61 72 $ cat >> $HGRCPATH <<EOF
62 73 > %include $TESTTMP/included-hgrc
63 74 > EOF
64 75 $ $PYTHON3 $HGBIN version | tail -1
65 76 *** failed to import extension babar from imaginary_elephant: *: 'imaginary_elephant' (glob)
66 77 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
67 78
68 79 $ rm included-hgrc
69 80 $ touch included-hgrc
70 81
71 82 Test bytes-ness of policy.policy with HGMODULEPOLICY
72 83
73 84 $ HGMODULEPOLICY=py
74 85 $ export HGMODULEPOLICY
75 86 $ $PYTHON3 `which hg` debuginstall 2>&1 2>&1 | tail -1
76 87 no problems detected
77 88
78 89 `hg init` can create empty repos
79 90
80 91 $ $PYTHON3 `which hg` init emptyrepo
General Comments 0
You need to be logged in to leave comments. Login now