Mercurial > evolve
annotate tests/test-oldconvert.t @ 6630:f2b8e94d7afb
evolve: let pytype ignore system cbor module
The better way to deal with this issue is to install cbor on CI images and let
pytype check it as well (since it's quite small), but let's just ignore it for
now and maybe consider other options later.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 01 Jan 2024 18:04:25 -0300 |
parents | a1dad44fe3da |
children |
rev | line source |
---|---|
224 | 1 $ cat >> $HGRCPATH <<EOF |
2 > [extensions] | |
3 > EOF | |
4 $ mkcommit() { | |
5 > echo "$1" > "$1" | |
6 > hg add "$1" | |
7 > hg ci -m "add $1" | |
8 > } | |
9 | |
10 create commit | |
11 | |
12 $ hg init repo | |
13 $ cd repo | |
14 $ mkcommit a | |
15 $ mkcommit b | |
16 $ hg up -q 0 | |
17 $ mkcommit c | |
18 created new head | |
19 | |
20 forge old style relation files | |
21 | |
22 $ hg log -r 2 --template='{node} ' > .hg/obsolete-relations | |
23 $ hg log -r 1 --template='{node}' >> .hg/obsolete-relations | |
24 | |
25 enable the extensions | |
26 | |
1810
ce4018f03520
hgext3rd: move 'obsolete' as 'evolve.legacy'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1065
diff
changeset
|
27 $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/legacy.py" >> $HGRCPATH |
224 | 28 |
2776
4dd84054ebbb
test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
1810
diff
changeset
|
29 $ hg log -G |
224 | 30 abort: old format of obsolete marker detected! |
31 run `hg debugconvertobsolete` once. | |
32 [255] | |
33 $ hg debugconvertobsolete --traceback | |
34 1 obsolete marker converted | |
2776
4dd84054ebbb
test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
1810
diff
changeset
|
35 $ hg log -G |
224 | 36 @ changeset: 2:d67cd0334eee |
37 | tag: tip | |
38 | parent: 0:1f0dee641bb7 | |
39 | user: test | |
40 | date: Thu Jan 01 00:00:00 1970 +0000 | |
41 | summary: add c | |
42 | | |
43 o changeset: 0:1f0dee641bb7 | |
44 user: test | |
45 date: Thu Jan 01 00:00:00 1970 +0000 | |
46 summary: add a | |
47 | |
441
d702f0d26c6a
obsolete: remove debugsuccessors
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
350
diff
changeset
|
48 $ hg debugobsolete |
1065
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
441
diff
changeset
|
49 7c3bad9141dcb46ff89abf5f61856facd56e476c d67cd0334eeecfded222fed9009f0db4beb57585 0 (*) {'user': 'test'} (glob) |
224 | 50 $ hg debugconvertobsolete |
51 nothing to do | |
52 0 obsolete marker converted | |
334
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
53 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
54 Convert json |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
55 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
56 $ cat > .hg/store/obsoletemarkers << EOF |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
57 > [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
58 > { |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
59 > "reason": "import from older format.", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
60 > "subjects": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
61 > "3218406b50ed13480765e7c260669620f37fba6e" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
62 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
63 > "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
|
64 > "date": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
65 > 1336503323.9768269, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
66 > -7200 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
67 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
68 > "object": "3e03d82708d4da97a92158558dd13386d8f09ad5", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
69 > "id": "4743f676eaf3923cb98c921ee06b2e91052c365b" |
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 > { |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
72 > "reason": "import from older format.", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
73 > "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
|
74 > "date": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
75 > 1336557472.7875929, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
76 > -7200 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
77 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
78 > "object": "5c722672795c3a2cb94d0cc9a821c394c1475f87", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
79 > "id": "1fd90a84b7225d2e3062b7e1b3100aa2e060fc72" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
80 > }, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
81 > { |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
82 > "reason": "import from older format.", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
83 > "subjects": [ |
350
b836862d48b4
[convert] properly exclude null successors from convertion
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
334
diff
changeset
|
84 > "0000000000000000000000000000000000000000" |
334
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
85 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
86 > "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
|
87 > "date": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
88 > 1336557472.784307, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
89 > -7200 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
90 > ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
91 > "object": "2c3784e102bb34ccc93862af5bd6d609ee30c577", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
92 > "id": "7d940c5ee1f886c8a6c0d805b43e522cb3ef7a15" |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
93 > } |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
94 > ] |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
95 > EOF |
2776
4dd84054ebbb
test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
1810
diff
changeset
|
96 $ hg log -G |
334
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
97 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
|
98 run `hg debugconvertobsolete` once. |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
99 [255] |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
100 $ hg debugconvertobsolete --traceback |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
101 3 obsolete marker converted |
441
d702f0d26c6a
obsolete: remove debugsuccessors
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
350
diff
changeset
|
102 $ hg debugobsolete |
1065
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
441
diff
changeset
|
103 7c3bad9141dcb46ff89abf5f61856facd56e476c d67cd0334eeecfded222fed9009f0db4beb57585 0 (*) {'user': 'test'} (glob) |
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
441
diff
changeset
|
104 3e03d82708d4da97a92158558dd13386d8f09ad5 3218406b50ed13480765e7c260669620f37fba6e 0 (Tue May 08 20:55:23 2012 +0200) {'user': 'Pierre-Yves David <pierre-yves.david@ens-lyon.org>'} |
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
441
diff
changeset
|
105 5c722672795c3a2cb94d0cc9a821c394c1475f87 0 (Wed May 09 11:57:52 2012 +0200) {'user': 'Pierre-Yves David <pierre-yves.david@logilab.fr>'} |
f355bbc124fc
test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
441
diff
changeset
|
106 2c3784e102bb34ccc93862af5bd6d609ee30c577 0 (Wed May 09 11:57:52 2012 +0200) {'user': 'Pierre-Yves David <pierre-yves.david@logilab.fr>'} |