Mercurial > hg
annotate tests/test-convert-cvs-synthetic.t @ 20742:3681de20b0a7
parsers: fail fast if Python has wrong minor version (issue4110)
This change causes an informative ImportError to be raised when importing
the parsers extension module if the minor version of the currently-running
Python interpreter doesn't match that of the Python used when compiling
the extension module.
This change also exposes a parsers.versionerrortext constant in the
C implementation of the module. Its presence can be used to determine
whether this behavior is present in a version of the module. The value
of the constant is the leading text of the ImportError raised and is set
to "Python minor version mismatch".
Here is an example of what the new error looks like:
Traceback (most recent call last):
File "test.py", line 1, in <module>
import mercurial.parsers
ImportError: Python minor version mismatch: The Mercurial extension
modules were compiled with Python 2.7.6, but Mercurial is currently using
Python with sys.hexversion=33883888: Python 2.5.6
(r256:88840, Nov 18 2012, 05:37:10)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))]
at: /opt/local/Library/Frameworks/Python.framework/Versions/2.5/Resources/
Python.app/Contents/MacOS/Python
The reason for raising an error in this scenario is that Python's C API
is known not to be compatible from minor version to minor version, even
if sys.api_version is the same. See for example this Python bug report
about incompatibilities between 2.5 and 2.6+:
http://bugs.python.org/issue8118
These incompatibilities can cause Mercurial to break in mysterious,
unforeseen ways. For example, when Mercurial compiled with Python 2.7 was
run with 2.5, the following crash occurred when running "hg status":
http://bz.selenic.com/show_bug.cgi?id=4110
After this crash was fixed, running with Python 2.5 no longer crashes, but
the following puzzling behavior still occurs:
$ hg status
...
File ".../mercurial/changelog.py", line 123, in __init__
revlog.revlog.__init__(self, opener, "00changelog.i")
File ".../mercurial/revlog.py", line 251, in __init__
d = self._io.parseindex(i, self._inline)
File ".../mercurial/revlog.py", line 158, in parseindex
index, cache = parsers.parse_index2(data, inline)
TypeError: data is not a string
which can be reproduced more simply with:
import mercurial.parsers as parsers
parsers.parse_index2("", True)
Both the crash and the TypeError occurred because the Python C API's
PyString_Check() returns the wrong value when the C header files from
Python 2.7 are run with Python 2.5. This is an example of an
incompatibility of the sort mentioned in the Python bug report above.
Failing fast with an informative error message results in a better user
experience in cases like the above. The information in the ImportError
also simplifies troubleshooting for those on Mercurial mailing lists, the
bug tracker, etc.
This patch only adds the version check to parsers.c, which is sufficient
to affect command-line commands like "hg status" and "hg summary".
An idea for a future improvement is to move the version-checking C code
to a more central location, and have it run when importing all
Mercurial extension modules and not just parsers.c.
author | Chris Jerdonek <chris.jerdonek@gmail.com> |
---|---|
date | Wed, 04 Dec 2013 20:38:27 -0800 |
parents | b349e476a622 |
children | 7a9cbb315d84 |
rev | line source |
---|---|
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
1 This feature requires use of builtin cvsps! |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
2 |
20230
b349e476a622
tests: test-convert-cvs-synthetic.t requires cvs 1.12
Mads Kiilerich <madski@unity3d.com>
parents:
20117
diff
changeset
|
3 $ "$TESTDIR/hghave" cvs112 || exit 80 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
4 $ echo "[extensions]" >> $HGRCPATH |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
5 $ echo "convert = " >> $HGRCPATH |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
7 create cvs repository with one project |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
8 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
9 $ mkdir cvsrepo |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
10 $ cd cvsrepo |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
11 $ CVSROOT=`pwd` |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
12 $ export CVSROOT |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
13 $ CVS_OPTIONS=-f |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
14 $ export CVS_OPTIONS |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
15 $ cd .. |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
16 $ cvscall() |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
17 > { |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
18 > cvs -f "$@" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
19 > } |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
20 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
21 output of 'cvs ci' varies unpredictably, so just discard it |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
22 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
23 $ cvsci() |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
24 > { |
14602
c4f271293134
tests: avoid instability in test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
12640
diff
changeset
|
25 > sleep 1 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
26 > cvs -f ci "$@" >/dev/null |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
27 > } |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
28 $ cvscall -d "$CVSROOT" init |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
29 $ mkdir cvsrepo/proj |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
30 $ cvscall -q co proj |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
31 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
32 create file1 on the trunk |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
33 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
34 $ cd proj |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
35 $ touch file1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
36 $ cvscall -Q add file1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
37 $ cvsci -m"add file1 on trunk" file1 |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
38 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
39 create two branches |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
40 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
41 $ cvscall -q tag -b v1_0 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
42 T file1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
43 $ cvscall -q tag -b v1_1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
44 T file1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
45 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
46 create file2 on branch v1_0 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
47 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
48 $ cvscall -Q up -rv1_0 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
49 $ touch file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
50 $ cvscall -Q add file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
51 $ cvsci -m"add file2" file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
52 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
53 create file3, file4 on branch v1_1 |
8081
6c3b8132078e
issue1577: fix broken test by assuming less about CVS output.
Greg Ward <greg-hg@gerg.ca>
parents:
7862
diff
changeset
|
54 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
55 $ cvscall -Q up -rv1_1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
56 $ touch file3 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
57 $ touch file4 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
58 $ cvscall -Q add file3 file4 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
59 $ cvsci -m"add file3, file4 on branch v1_1" file3 file4 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
60 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
61 merge file2 from v1_0 to v1_1 |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
62 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
63 $ cvscall -Q up -jv1_0 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
64 $ cvsci -m"MERGE from v1_0: add file2" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
65 cvs commit: Examining . |
8081
6c3b8132078e
issue1577: fix broken test by assuming less about CVS output.
Greg Ward <greg-hg@gerg.ca>
parents:
7862
diff
changeset
|
66 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
67 Step things up a notch: now we make the history really hairy, with |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
68 changes bouncing back and forth between trunk and v1_2 and merges |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
69 going both ways. (I.e., try to model the real world.) |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
70 create branch v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
71 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
72 $ cvscall -Q up -A |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
73 $ cvscall -q tag -b v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
74 T file1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
75 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
76 create file5 on branch v1_2 |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
77 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
78 $ cvscall -Q up -rv1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
79 $ touch file5 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
80 $ cvs -Q add file5 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
81 $ cvsci -m"add file5 on v1_2" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
82 cvs commit: Examining . |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
83 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
84 create file6 on trunk post-v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
85 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
86 $ cvscall -Q up -A |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
87 $ touch file6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
88 $ cvscall -Q add file6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
89 $ cvsci -m"add file6 on trunk post-v1_2" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
90 cvs commit: Examining . |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
91 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
92 merge file5 from v1_2 to trunk |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
93 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
94 $ cvscall -Q up -A |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
95 $ cvscall -Q up -jv1_2 file5 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
96 $ cvsci -m"MERGE from v1_2: add file5" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
97 cvs commit: Examining . |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
98 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
99 merge file6 from trunk to v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
100 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
101 $ cvscall -Q up -rv1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
102 $ cvscall up -jHEAD file6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
103 U file6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
104 $ cvsci -m"MERGE from HEAD: add file6" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
105 cvs commit: Examining . |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
106 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
107 cvs rlog output |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
108 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
109 $ cvscall -q rlog proj | egrep '^(RCS file|revision)' |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
110 RCS file: $TESTTMP/cvsrepo/proj/file1,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
111 revision 1.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
112 RCS file: $TESTTMP/cvsrepo/proj/Attic/file2,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
113 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
114 revision 1.1.4.2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
115 revision 1.1.4.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
116 revision 1.1.2.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
117 RCS file: $TESTTMP/cvsrepo/proj/Attic/file3,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
118 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
119 revision 1.1.2.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
120 RCS file: $TESTTMP/cvsrepo/proj/Attic/file4,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
121 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
122 revision 1.1.2.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
123 RCS file: $TESTTMP/cvsrepo/proj/file5,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
124 revision 1.2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
125 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
126 revision 1.1.2.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
127 RCS file: $TESTTMP/cvsrepo/proj/file6,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
128 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
129 revision 1.1.2.2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
130 revision 1.1.2.1 |
8249
2c7c973c2abd
Reproduce crash where synthetic revs break merge detection (issue1578).
Greg Ward <greg-hg@gerg.ca>
parents:
8081
diff
changeset
|
131 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
132 convert to hg (#1) |
8249
2c7c973c2abd
Reproduce crash where synthetic revs break merge detection (issue1578).
Greg Ward <greg-hg@gerg.ca>
parents:
8081
diff
changeset
|
133 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
134 $ cd .. |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
135 $ hg convert --datesort proj proj.hg |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
136 initializing destination proj.hg repository |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
137 connecting to $TESTTMP/cvsrepo |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
138 scanning source... |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
139 collecting CVS rlog |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
140 15 log entries |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
141 creating changesets |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
142 9 changeset entries |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
143 sorting... |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
144 converting... |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
145 8 add file1 on trunk |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
146 7 add file2 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
147 6 MERGE from v1_0: add file2 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
148 5 file file3 was initially added on branch v1_1. |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
149 4 add file3, file4 on branch v1_1 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
150 3 add file5 on v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
151 2 add file6 on trunk post-v1_2 |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
152 1 MERGE from HEAD: add file6 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
153 0 MERGE from v1_2: add file5 |
8249
2c7c973c2abd
Reproduce crash where synthetic revs break merge detection (issue1578).
Greg Ward <greg-hg@gerg.ca>
parents:
8081
diff
changeset
|
154 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
18262
diff
changeset
|
155 hg log -G output (#1) |
8249
2c7c973c2abd
Reproduce crash where synthetic revs break merge detection (issue1578).
Greg Ward <greg-hg@gerg.ca>
parents:
8081
diff
changeset
|
156 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
18262
diff
changeset
|
157 $ hg -R proj.hg log -G --template "{rev} {desc}\n" |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
158 o 8 MERGE from v1_2: add file5 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
159 | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
160 | o 7 MERGE from HEAD: add file6 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
161 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
162 o | 6 add file6 on trunk post-v1_2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
163 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
164 | o 5 add file5 on v1_2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
165 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
166 | | o 4 add file3, file4 on branch v1_1 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
167 | | | |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
168 o | | 3 file file3 was initially added on branch v1_1. |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
169 |/ / |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
170 | o 2 MERGE from v1_0: add file2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
171 |/ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
172 | o 1 add file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
173 |/ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
174 o 0 add file1 on trunk |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
175 |
8249
2c7c973c2abd
Reproduce crash where synthetic revs break merge detection (issue1578).
Greg Ward <greg-hg@gerg.ca>
parents:
8081
diff
changeset
|
176 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
177 convert to hg (#2: with merge detection) |
8081
6c3b8132078e
issue1577: fix broken test by assuming less about CVS output.
Greg Ward <greg-hg@gerg.ca>
parents:
7862
diff
changeset
|
178 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
179 $ hg convert \ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
180 > --config convert.cvsps.mergefrom='"^MERGE from (\S+):"' \ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
181 > --datesort \ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
182 > proj proj.hg2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
183 initializing destination proj.hg2 repository |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
184 connecting to $TESTTMP/cvsrepo |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
185 scanning source... |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
186 collecting CVS rlog |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
187 15 log entries |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
188 creating changesets |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
189 9 changeset entries |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
190 sorting... |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
191 converting... |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
192 8 add file1 on trunk |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
193 7 add file2 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
194 6 MERGE from v1_0: add file2 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
195 5 file file3 was initially added on branch v1_1. |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
196 4 add file3, file4 on branch v1_1 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
197 3 add file5 on v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
198 2 add file6 on trunk post-v1_2 |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
199 1 MERGE from HEAD: add file6 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
200 0 MERGE from v1_2: add file5 |
8249
2c7c973c2abd
Reproduce crash where synthetic revs break merge detection (issue1578).
Greg Ward <greg-hg@gerg.ca>
parents:
8081
diff
changeset
|
201 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
18262
diff
changeset
|
202 hg log -G output (#2) |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
203 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
18262
diff
changeset
|
204 $ hg -R proj.hg2 log -G --template "{rev} {desc}\n" |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
205 o 8 MERGE from v1_2: add file5 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
206 | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
207 | o 7 MERGE from HEAD: add file6 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
208 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
209 o | 6 add file6 on trunk post-v1_2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
210 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
211 | o 5 add file5 on v1_2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
212 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
213 | | o 4 add file3, file4 on branch v1_1 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
214 | | | |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
215 o | | 3 file file3 was initially added on branch v1_1. |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
216 |/ / |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
217 | o 2 MERGE from v1_0: add file2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
218 |/ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
219 | o 1 add file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
220 |/ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
221 o 0 add file1 on trunk |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
222 |