Mercurial > evolve
annotate tests/test-oldconvert.t @ 334:fb83210bce32 stable
obsolete: move to official binary format
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 03 Jul 2012 12:58:55 +0200 |
parents | f60555898df4 |
children | b836862d48b4 |
rev | line source |
---|---|
224 | 1 $ cat >> $HGRCPATH <<EOF |
2 > [web] | |
3 > push_ssl = false | |
4 > allow_push = * | |
5 > [phases] | |
6 > publish=False | |
7 > [alias] | |
8 > odiff=diff --rev 'limit(obsparents(.),1)' --rev . | |
9 > [extensions] | |
10 > hgext.graphlog= | |
11 > EOF | |
12 $ mkcommit() { | |
13 > echo "$1" > "$1" | |
14 > hg add "$1" | |
15 > hg ci -m "add $1" | |
16 > } | |
17 | |
18 create commit | |
19 | |
20 $ hg init repo | |
21 $ cd repo | |
22 $ mkcommit a | |
23 $ mkcommit b | |
24 $ hg up -q 0 | |
25 $ mkcommit c | |
26 created new head | |
27 | |
28 forge old style relation files | |
29 | |
30 $ hg log -r 2 --template='{node} ' > .hg/obsolete-relations | |
31 $ hg log -r 1 --template='{node}' >> .hg/obsolete-relations | |
32 | |
33 enable the extensions | |
34 | |
35 $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH | |
36 | |
37 $ hg glog | |
38 abort: old format of obsolete marker detected! | |
39 run `hg debugconvertobsolete` once. | |
40 [255] | |
41 $ hg debugconvertobsolete --traceback | |
42 1 obsolete marker converted | |
43 $ hg glog | |
44 @ changeset: 2:d67cd0334eee | |
45 | tag: tip | |
46 | parent: 0:1f0dee641bb7 | |
47 | user: test | |
48 | date: Thu Jan 01 00:00:00 1970 +0000 | |
49 | summary: add c | |
50 | | |
51 o changeset: 0:1f0dee641bb7 | |
52 user: test | |
53 date: Thu Jan 01 00:00:00 1970 +0000 | |
54 summary: add a | |
55 | |
334
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
56 $ hg debugsuccessors |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
57 7c3bad9141dc d67cd0334eee |
224 | 58 $ hg debugconvertobsolete |
59 nothing to do | |
60 0 obsolete marker converted | |
334
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
61 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
62 Convert json |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
63 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
64 $ cat > .hg/store/obsoletemarkers << EOF |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
65 > [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
66 > { |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
67 > "reason": "import from older format.", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
68 > "subjects": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
69 > "3218406b50ed13480765e7c260669620f37fba6e" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
70 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
71 > "user": "Pierre-Yves David <pierre-yves.david@ens-lyon.org>", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
72 > "date": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
73 > 1336503323.9768269, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
74 > -7200 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
75 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
76 > "object": "3e03d82708d4da97a92158558dd13386d8f09ad5", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
77 > "id": "4743f676eaf3923cb98c921ee06b2e91052c365b" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
78 > }, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
79 > { |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
80 > "reason": "import from older format.", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
81 > "subjects": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
82 > "a37154106de358121a32a3dd6ba0281931550515" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
83 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
84 > "user": "Pierre-Yves David <pierre-yves.david@logilab.fr>", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
85 > "date": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
86 > 1336557472.7875929, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
87 > -7200 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
88 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
89 > "object": "5c722672795c3a2cb94d0cc9a821c394c1475f87", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
90 > "id": "1fd90a84b7225d2e3062b7e1b3100aa2e060fc72" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
91 > }, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
92 > { |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
93 > "reason": "import from older format.", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
94 > "subjects": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
95 > "dc8d8aa6e8ac490fcafd074d570df0787ee0ee69" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
96 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
97 > "user": "Pierre-Yves David <pierre-yves.david@logilab.fr>", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
98 > "date": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
99 > 1336557472.784307, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
100 > -7200 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
101 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
102 > "object": "2c3784e102bb34ccc93862af5bd6d609ee30c577", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
103 > "id": "7d940c5ee1f886c8a6c0d805b43e522cb3ef7a15" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
104 > } |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
105 > ] |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
106 > EOF |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
107 $ hg glog |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
108 abort: old format of obsolete marker detected! |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
109 run `hg debugconvertobsolete` once. |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
110 [255] |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
111 $ hg debugconvertobsolete --traceback |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
112 3 obsolete marker converted |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
113 $ hg debugsuccessors |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
114 2c3784e102bb dc8d8aa6e8ac |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
115 3e03d82708d4 3218406b50ed |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
116 5c722672795c a37154106de3 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
117 7c3bad9141dc d67cd0334eee |