Mercurial > hg
annotate tests/test-convert-cvs-synthetic.t @ 24545:9e0c67e84896
json: implement {tags} template
Tags is pretty easy to implement. Let's start there.
The output is slightly different from `hg tags -Tjson`. For reference,
the CLI has the following output:
[
{
"node": "e2049974f9a23176c2addb61d8f5b86e0d620490",
"rev": 29880,
"tag": "tip",
"type": ""
},
...
]
Our output has the format:
{
"node": "0aeb19ea57a6d223bacddda3871cb78f24b06510",
"tags": [
{
"node": "e2049974f9a23176c2addb61d8f5b86e0d620490",
"tag": "tag1",
"date": [1427775457.0, 25200]
},
...
]
}
"rev" is omitted because it isn't a reliable identifier. We shouldn't
be exposing them in web APIs and giving the impression it remotely
resembles a stable identifier. Perhaps we could one day hide this behind
a config option (it might be useful to expose when running servers
locally).
The "type" of the tag isn't defined because this information isn't yet
exposed to the hgweb templater (it could be in a follow-up) and because
it is questionable whether different types should be exposed at all.
(Should the web interface really be exposing "local" tags?)
We use an object for the outer type instead of Array for a few reasons.
First, it is extensible. If we ever need to throw more global properties
into the output, we can do that without breaking backwards compatibility
(property additions should be backwards compatible). Second, uniformity
in web APIs is nice. Having everything return objects seems much saner than
a mix of array and object. Third, there are security issues with arrays
in older browsers. The JSON web services world almost never uses arrays
as the main type for this reason.
Another possibly controversial part about this patch is how dates are
defined. While JSON has a Date type, it is based on the JavaScript Date
type, which is widely considered a pile of garbage. It is a non-starter
for this reason.
Many of Mercurial's built-in date filters drop seconds resolution. So
that's a non-starter as well, since we want the API to be lossless where
possible. rfc3339date, rfc822date, isodatesec, and date are all lossless.
However, they each require the client to perform string parsing on top of
JSON decoding. While date parsing libraries are pretty ubiquitous, some
languages don't have them out of the box. However, pretty much every
programming language can deal with UNIX timestamps (which are just
integers or floats). So, we choose to use Mercurial's internal date
representation, which in JSON is modeled as float seconds since UNIX
epoch and an integer timezone offset from UTC (keep in mind
JavaScript/JSON models all "Numbers" as double prevision floating point
numbers, so there isn't a difference between ints and floats in JSON).
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 31 Mar 2015 14:52:21 -0700 |
parents | 96529f81e2e9 |
children | e5e5ee2b60e4 |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
20230
diff
changeset
|
1 #require cvs112 |
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
20230
diff
changeset
|
2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
3 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
|
4 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
5 $ echo "[extensions]" >> $HGRCPATH |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
6 $ echo "convert = " >> $HGRCPATH |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
7 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
8 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
|
9 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
10 $ mkdir cvsrepo |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
11 $ cd cvsrepo |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
12 $ CVSROOT=`pwd` |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
13 $ export CVSROOT |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
14 $ CVS_OPTIONS=-f |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
15 $ export CVS_OPTIONS |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
16 $ cd .. |
23675
96529f81e2e9
tests: run 'cvs init' only on non-existent directories (issue4482)
Thomas Klausner <tk@giga.or.at>
parents:
22046
diff
changeset
|
17 $ rmdir cvsrepo |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
18 $ cvscall() |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
19 > { |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
20 > cvs -f "$@" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
21 > } |
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 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
|
24 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
25 $ cvsci() |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
26 > { |
14602
c4f271293134
tests: avoid instability in test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
12640
diff
changeset
|
27 > sleep 1 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
28 > cvs -f ci "$@" >/dev/null |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
29 > } |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
30 $ cvscall -d "$CVSROOT" init |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
31 $ mkdir cvsrepo/proj |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
32 $ cvscall -q co proj |
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 create file1 on the trunk |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
35 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
36 $ cd proj |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
37 $ touch file1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
38 $ cvscall -Q add file1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
39 $ 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
|
40 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
41 create two branches |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
42 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
43 $ cvscall -q tag -b v1_0 |
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 $ cvscall -q tag -b v1_1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
46 T file1 |
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 create file2 on branch v1_0 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
49 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
50 $ cvscall -Q up -rv1_0 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
51 $ touch file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
52 $ cvscall -Q add file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
53 $ cvsci -m"add file2" file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
54 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
55 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
|
56 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
57 $ cvscall -Q up -rv1_1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
58 $ touch file3 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
59 $ touch file4 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
60 $ cvscall -Q add file3 file4 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
61 $ 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
|
62 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
63 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
|
64 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
65 $ cvscall -Q up -jv1_0 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
66 $ cvsci -m"MERGE from v1_0: add file2" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
67 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
|
68 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
69 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
|
70 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
|
71 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
|
72 create branch v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
73 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
74 $ cvscall -Q up -A |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
75 $ cvscall -q tag -b v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
76 T file1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
77 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
78 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
|
79 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
80 $ cvscall -Q up -rv1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
81 $ touch file5 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
82 $ cvs -Q add file5 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
83 $ cvsci -m"add file5 on v1_2" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
84 cvs commit: Examining . |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
85 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
86 create file6 on trunk post-v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
87 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
88 $ cvscall -Q up -A |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
89 $ touch file6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
90 $ cvscall -Q add file6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
91 $ 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
|
92 cvs commit: Examining . |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
93 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
94 merge file5 from v1_2 to trunk |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
95 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
96 $ cvscall -Q up -A |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
97 $ cvscall -Q up -jv1_2 file5 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
98 $ cvsci -m"MERGE from v1_2: add file5" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
99 cvs commit: Examining . |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
100 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
101 merge file6 from trunk to v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
102 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
103 $ cvscall -Q up -rv1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
104 $ cvscall up -jHEAD file6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
105 U file6 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
106 $ cvsci -m"MERGE from HEAD: add file6" |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
107 cvs commit: Examining . |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
108 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
109 cvs rlog output |
7862
02981000012e
cvsps: recognize and eliminate CVS' synthetic "file added" revisions.
Greg Ward <greg-hg@gerg.ca>
parents:
diff
changeset
|
110 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
111 $ cvscall -q rlog proj | egrep '^(RCS file|revision)' |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
112 RCS file: $TESTTMP/cvsrepo/proj/file1,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
113 revision 1.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
114 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
|
115 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
116 revision 1.1.4.2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
117 revision 1.1.4.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
118 revision 1.1.2.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
119 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
|
120 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
121 revision 1.1.2.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
122 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
|
123 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
124 revision 1.1.2.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
125 RCS file: $TESTTMP/cvsrepo/proj/file5,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
126 revision 1.2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
127 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
128 revision 1.1.2.1 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
129 RCS file: $TESTTMP/cvsrepo/proj/file6,v |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
130 revision 1.1 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
131 revision 1.1.2.2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
132 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
|
133 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
134 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
|
135 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
136 $ cd .. |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
137 $ hg convert --datesort proj proj.hg |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
138 initializing destination proj.hg repository |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
139 connecting to $TESTTMP/cvsrepo |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
140 scanning source... |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
141 collecting CVS rlog |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
142 15 log entries |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
143 creating changesets |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
144 9 changeset entries |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
145 sorting... |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
146 converting... |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
147 8 add file1 on trunk |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
148 7 add file2 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
149 6 MERGE from v1_0: add file2 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
150 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
|
151 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
|
152 3 add file5 on v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
153 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
|
154 1 MERGE from HEAD: add file6 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
155 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
|
156 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
18262
diff
changeset
|
157 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
|
158 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
18262
diff
changeset
|
159 $ 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
|
160 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
|
161 | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
162 | o 7 MERGE from HEAD: add file6 |
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 | 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
|
165 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
166 | o 5 add file5 on v1_2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
167 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
168 | | 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
|
169 | | | |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
170 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
|
171 |/ / |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
172 | 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
|
173 |/ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
174 | o 1 add file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
175 |/ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
176 o 0 add file1 on trunk |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
177 |
8249
2c7c973c2abd
Reproduce crash where synthetic revs break merge detection (issue1578).
Greg Ward <greg-hg@gerg.ca>
parents:
8081
diff
changeset
|
178 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
179 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
|
180 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
181 $ hg convert \ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
182 > --config convert.cvsps.mergefrom='"^MERGE from (\S+):"' \ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
183 > --datesort \ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
184 > proj proj.hg2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
185 initializing destination proj.hg2 repository |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12522
diff
changeset
|
186 connecting to $TESTTMP/cvsrepo |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
187 scanning source... |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
188 collecting CVS rlog |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
189 15 log entries |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
190 creating changesets |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
191 9 changeset entries |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
192 sorting... |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
193 converting... |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
194 8 add file1 on trunk |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
195 7 add file2 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
196 6 MERGE from v1_0: add file2 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
197 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
|
198 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
|
199 3 add file5 on v1_2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
200 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
|
201 1 MERGE from HEAD: add file6 |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
202 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
|
203 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
18262
diff
changeset
|
204 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
|
205 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
18262
diff
changeset
|
206 $ 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
|
207 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
|
208 | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
209 | o 7 MERGE from HEAD: add file6 |
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 | 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
|
212 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
213 | o 5 add file5 on v1_2 |
12522
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
214 | | |
18262
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
215 | | 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
|
216 | | | |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
217 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
|
218 |/ / |
ed923a2d5ae9
tests: update test-convert-cvs*.t
Bryan O'Sullivan <bos@serpentine.com>
parents:
14602
diff
changeset
|
219 | 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
|
220 |/ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
221 | o 1 add file2 |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
222 |/ |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
223 o 0 add file1 on trunk |
7813e6b44a0b
tests: unify test-convert-cvs-synthetic
Matt Mackall <mpm@selenic.com>
parents:
10802
diff
changeset
|
224 |