Mercurial > evolve
annotate docs/obs-implementation.rst @ 284:88a851a54f26
evolve: fix relocate() with removed revision
relocate() was not handling the case where the rebased revision was
discarded and was raising when trying to update the phase of None.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Tue, 19 Jun 2012 17:57:54 +0200 |
parents | 1a713fa2d3ba |
children | 5eecfda0a5c7 |
rev | line source |
---|---|
161
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
1 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
2 ----------------------------------------------------- |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
3 Implementation of Obsolete Marker |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
4 ----------------------------------------------------- |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
5 .. warning:: This document is still in heavy work in progress |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
6 |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
7 Main questions about Obsolete Marker Implementation |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
8 ----------------------------------------------------- |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
9 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
10 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
11 What data should be contained in a Marker ? |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
12 ```````````````````````````````````````````````````` |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
13 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
14 There is two critical data that **must** be stored in an obsolete Marker. |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
15 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
16 :object: |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
17 the old obsoleted changeset |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
18 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
19 :replacements: |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
20 list of new changeset. list size can be anything, including 0 (0..N) |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
21 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
22 Everybody agreed on this point. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
23 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
24 --- |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
25 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
26 This is probably a good idea to have an unique Identifier, for UI, transfert and |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
27 access. |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
28 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
29 :id: same as changeset but for marker. |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
30 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
31 The field below will depends of the way we exchange obsolete marker betwenn |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
32 changeset. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
33 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
34 --- |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
35 |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
36 Having audit data will be very usefull. When it get messy you need all the |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
37 information you can to understand the situation. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
38 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
39 I have the felling that we are versionning history. Therefor we will probably |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
40 need the same kind of information than when versionning Files. |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
41 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
42 :date: date of the marker creation |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
43 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
44 :user: ui.username |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
45 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
46 To go further: |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
47 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
48 :description: "Optional reason for the rewrite (generated of added by the user)" |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
49 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
50 :tool: the automated too that made this |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
51 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
52 :operation: Kind of rewritting operation that created the marker (delete, |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
53 update, split, fold, reordering) To help conflict resolution. |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
54 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
55 Matt see this a "too complicated". I'll wait for him to meet a very hairy |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
56 situation to agree that they are needed. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
57 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
58 Leaving the door open to any addition data is an option too. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
59 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
60 How shall we store Marker on disk |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
61 ````````````````````````````````````````````````````````` |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
62 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
63 Requirement |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
64 ............. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
65 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
66 We need to quickly load the 'object' to know the "obsolete" set. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
67 We need quick access by object and replacements to travels along the graph. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
68 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
69 Common Part |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
70 ............. |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
71 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
72 The file is store in `.hg/store/obsmarkers`. It is a binary files: |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
73 |
247 | 74 The files starts with a Format Version string |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
75 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
76 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
77 Minimalistic proposal |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
78 ......................... |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
79 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
80 The core of a Marker will we stored as: |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
81 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
82 * number of replacement (8-Bytes integer) |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
83 * node id of the obsolete changeset (20-Bytes hash) |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
84 * node id of replacement changeset (20-Bytes hash x number of remplacement) |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
85 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
86 Version with ID |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
87 ......................... |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
88 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
89 This version add a node id computed from the marker content. It will be present |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
90 *before* other data: |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
91 |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
92 * node id of the maker (20-Bytes hash) |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
93 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
94 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
95 Version with Metadata proposal |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
96 ............................... |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
97 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
98 An extra files is used to old metadata (date, user, etc) `.hg/store/obs-extra`:. The format of this |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
99 field is undefined yet. This will add the following field at the end of a marker |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
100 |
246
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
101 * offset of the metadata in obs-extra (8-Bytes integer) |
1e8e32d3871c
doc: idea about OnDisk Storage
Pierre-Yves.David@ens-lyon.org
parents:
244
diff
changeset
|
102 |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
103 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
104 How shall we exchange Marker over the Wire ? |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
105 ````````````````````````````````````````````````````````` |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
106 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
107 We can have a lot of markers. We do not want to exchange data for the one we |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
108 already know. Listkey() is not very appropriate there as you get everything. |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
109 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
110 Moreover, we might want to only hear about Marker that impact changeset we are |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
111 pulling. |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
112 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
113 pushkey is not batchable yet (could be fixed) |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
114 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
115 A dedicated discovery and exchange protocol seems mandatory here. |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
116 |
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
117 |
161
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
118 Various technical details |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
119 ----------------------------------------------------- |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
120 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
121 Some stuff that worse to note. some may deserve their own section later. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
122 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
123 storing old changeset |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
124 `````````````````````` |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
125 |
244
9d37254031fc
[doc] add Question and Answer about Obsolet Marker Implementation
Pierre-Yves.David@ens-lyon.org
parents:
228
diff
changeset
|
126 The new general delta format allows a very efficient storage of two very similar |
161
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
127 changesets. Storing obsolete childrens using general delta takes no more place |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
128 than storing the obsolete diff. Reverted file will even we reused. The whole |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
129 operation will take much less space the strip backup. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
130 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
131 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
132 Abstraction from history rewriting UI |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
133 ``````````````````````````````````````````` |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
134 |
228
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
135 How Mercurial handle obsolete marker is independent from who decide to create |
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
136 them and what actual operation solve error case. Any of the existing history |
161
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
137 rewriting UI (rebase, mq, histedit) can lay obsolete marker and resolve |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
138 situation created by other. To go further a hook system of obsolete marker |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
139 creation would allow each mechanism to collaborate with other though a standard |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
140 and central mechanism. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
141 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
142 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
143 Obsolete marker storage |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
144 ``````````````````````````` |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
145 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
146 Obsolete marker will most likely be stored outside standard history. They are |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
147 multiple reasons for that: |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
148 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
149 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
150 First, obsolete markers are really perpendicular to standard history there is not |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
151 strong reason to include it here other than convenience. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
152 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
153 Second, storing obsolete marker inside standard history means: |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
154 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
155 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
156 * A changeset must be created every time an obsolete relation is added. Very |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
157 inconvenient for delete operation. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
158 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
159 * Obsolete marker must be forged at the creation of the new changeset. This |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
160 is very inconvenient for split operation. And in general it become |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
161 complicated to fix history afterward in particular when working with older |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
162 client. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
163 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
164 Storing obsolete marker outside history have several pro: |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
165 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
166 * It ease Exchange of obsolete marker without unnecessary obsolete changeset content |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
167 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
168 * It allow tuning the actual storage and protocol exchange while maintaining |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
169 compatibility with older client through the wire (as we do the repository |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
170 format) |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
171 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
172 * ease the exchange of obsolete related information during discovery to exchange |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
173 obsolete changeset relevant to conflict resolution. Exchanging such |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
174 information deserve a dedicated protocol. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
175 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
176 Persistent |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
177 ``````````````````````` |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
178 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
179 *Extinct* changeset and obsolete marker will most likely be garbage collected as |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
180 some point. However, archive server may decide to keep them forever in order to |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
181 keep a fully auditable history in it's finest conception. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
182 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
183 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
184 Current status |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
185 ----------------------------------------------------- |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
186 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
187 An experimental implementatione exists. What have been done so far. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
188 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
189 |
228
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
190 * 1-1 obsolete marker stored outside history, |
161
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
191 |
228
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
192 * compute obsolete-tip |
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
193 |
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
194 * obsolete marker exchange through pushkey, |
161
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
195 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
196 * compute obsolete, unstable, extinct and suspended set. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
197 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
198 * hidden extinct changesets for UI. |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
199 |
228
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
200 * Use secret phase to remove from discovery obsolete and unstable changeset (to |
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
201 be improved soon) |
161
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
202 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
203 * alter rebase to use obsolete marker instead of stripping. (XXX break --keep for now) |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
204 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
205 * Have an experimental mq-like extension to rewrite history (more on that later) |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
206 |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
207 * Have an extension to update and mq repository according evolution of standard (more on that later) |
4e3f25ba5401
More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
208 |