author | Pierre-Yves.David@ens-lyon.org |
Fri, 13 Jul 2012 13:07:42 +0200 | |
changeset 361 | ac7969043677 |
parent 350 | b836862d48b4 |
child 441 | d702f0d26c6a |
permissions | -rw-r--r-- |
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 |
> "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
|
82 |
> "date": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
83 |
> 1336557472.7875929, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
84 |
> -7200 |
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 |
> "object": "5c722672795c3a2cb94d0cc9a821c394c1475f87", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
87 |
> "id": "1fd90a84b7225d2e3062b7e1b3100aa2e060fc72" |
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 |
> { |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
90 |
> "reason": "import from older format.", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
91 |
> "subjects": [ |
350
b836862d48b4
[convert] properly exclude null successors from convertion
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
334
diff
changeset
|
92 |
> "0000000000000000000000000000000000000000" |
334
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 |
> "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
|
95 |
> "date": [ |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
96 |
> 1336557472.784307, |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
97 |
> -7200 |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
98 |
> ], |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
99 |
> "object": "2c3784e102bb34ccc93862af5bd6d609ee30c577", |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
100 |
> "id": "7d940c5ee1f886c8a6c0d805b43e522cb3ef7a15" |
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 |
> ] |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
103 |
> EOF |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
104 |
$ hg glog |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
105 |
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
|
106 |
run `hg debugconvertobsolete` once. |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
107 |
[255] |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
108 |
$ hg debugconvertobsolete --traceback |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
109 |
3 obsolete marker converted |
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
110 |
$ hg debugsuccessors |
350
b836862d48b4
[convert] properly exclude null successors from convertion
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
334
diff
changeset
|
111 |
2c3784e102bb |
334
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
112 |
3e03d82708d4 3218406b50ed |
350
b836862d48b4
[convert] properly exclude null successors from convertion
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
334
diff
changeset
|
113 |
5c722672795c |
334
fb83210bce32
obsolete: move to official binary format
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
224
diff
changeset
|
114 |
7c3bad9141dc d67cd0334eee |