Mercurial > evolve
annotate docs/instability.rst @ 531:b18b00036355 stable 1.0.0
pkg/debian: Debian packaging
This change add the necessary files to create a debian package for the evolve
extension. I do not care about the rest.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 29 Aug 2012 11:36:10 +0200 |
parents | 9825c7da5b54 |
children | 4f5562c92630 |
rev | line source |
---|---|
519
9825c7da5b54
ensure all file have a copyright notice
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
492
diff
changeset
|
1 .. Copyright 2011 Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
9825c7da5b54
ensure all file have a copyright notice
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
492
diff
changeset
|
2 .. Logilab SA <contact@logilab.fr> |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
3 |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
4 ----------------------------------- |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
5 The instability Principle |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
6 ----------------------------------- |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
7 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
8 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
9 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
10 An intrinsic contradiction |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
11 ----------------------------------- |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
12 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
13 XXX starts by talking about getting ride of changeset. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
14 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
15 DVCSes bring two new major concepts to the Version Control Scene: |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
16 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
17 * History is organized as a robust DAG, |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
18 * History can be rewritten. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
19 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
20 However, the two concepts are in contradiction: |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
21 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
22 To achieve a robust history, three key elements are gathered in *changesets*: |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
23 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
24 * Full snapshot of the versioned content, |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
25 * Reference to the previous full snapshot used to build the new one, |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
26 * A description of the change who lead from the old content to the new old. |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
27 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
28 All three elements are to compute a *unique* hash that identify the changeset |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
29 (with various other metadata). This identification is a key part of DVCS design. |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
30 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
31 This is a very useful property because Changing B parent means |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
32 changing B content too. This requires the creation of **another** |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
33 changeset, which is semantically good. |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
34 |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
35 :: |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
36 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
37 Schema base, A, B and B' |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
38 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
39 To avoid duplication, the older changeset is usually discarded from accessible |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
40 history. I'm calling them *obsolete* changesets. |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
41 |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
42 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
43 But rewriting a changeset with children does not change these |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
44 children's parent! And because children of the rewritten changeset |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
45 still **depend** on the older "dead" version of the changeset with |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
46 can not get rid of this dead version. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
47 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
48 :: |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
49 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
50 Schema base, A and A' and B. |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
51 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
52 I'm calling these children **unstable** because they are based on a |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
53 dead changeset and prevent people to get rid of it. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
54 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
55 This instability is an **unavoidable consequence** of the strict dependency of |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
56 changeset. History Rewriting history alway need to take it in account and |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
57 provide a way to rewrite the descendant on the new changeset to avoid |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
58 coexistence of the old and new version of a rewritten changeset. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
59 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
60 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
61 Everybody is working around the issue |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
62 ------------------------------------------------ |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
63 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
64 I'm not claiming that rewriting history is impossible. People are successfully |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
65 doing for years. However they all need to work around *instability*. Several |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
66 work around strategy exists. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
67 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
68 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
69 Rewriting all at once |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
70 `````````````````````````` |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
71 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
72 The simplest way to avoid instability is to ensure rewriting |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
73 operations always end in a stable situation. This is achieved by |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
74 rewriting all affected changesets at the same time. |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
75 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
76 Rewriting all descendants at the same time when rewriting a changeset. |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
77 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
78 :: |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
79 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
80 Schema! |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
81 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
82 Several Mercurial commands apply it: rebase, collapse, histedit. |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
83 Mercurial also refuses to amend changeset with descendant. The git |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
84 branch design enforces such approach in git too. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
85 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
86 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
87 However, DVCS are **Distributed**. This means that you do not control what |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
88 happen outside your repository. Once a changeset have been exchanged *outside*, |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
89 there is no way to be sure it does not have descendants somewhere else. |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
90 Therefore **if you rewrite changeset that exists elsewhere, you can't eradicate |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
91 the risk of instability.** |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
92 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
93 Do not rewrite exchanged changeset |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
94 ``````````````````````````````````` |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
95 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
96 To work around the issue above, Mercurial introduced phases, which |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
97 prevent you from rewriting shared changesets and ensure others can't |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
98 pull certain changesets from you. But this is a very frustrating |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
99 limitation that prevents you to efficiently sharing, reviewing and |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
100 collaborating on mutable changesets. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
101 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
102 In the Git world, they use another approach to prevent instability. By |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
103 convention only a single developper works on a changeset contained in |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
104 a named branch. But once again this is a huge blocker for |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
105 collaborating. Moreover clueless people **will** mess up social |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
106 convention soon or later. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
107 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
108 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
109 Loose the DAG robustness |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
110 ```````````````````````````` |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
111 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
112 The other approach in Mercurial is to keep the mutable part of the |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
113 history outside the DVCS constraint. This is the MQ approach of |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
114 sticking a quilt queue over Mercurial. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
115 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
116 This allow much more flexible workflow but two major feature are lost in the |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
117 process: |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
118 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
119 :Graceful merge: MQ use plain-patch to store changeset content and patch have |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
120 trouble to apply in changing context. Applying your queue |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
121 becomes very painful when context changes. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
122 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
123 :easy branching: A quilt queue is by definition a linear queue. Increasing risk |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
124 of conflict |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
125 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
126 It is possible to collaborate over versioned mq! But you are going to |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
127 have a lot of troubles. |
228
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
128 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
129 Ignore conflicts |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
130 ``````````````````````````````````` |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
131 |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
132 Another ignored issue is a conflicting rewrite of the same changeset. |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
133 If a changeset is rewritten two times we have two newer versions, |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
134 and duplicated history is complicated to merge. |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
135 |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
136 Mercurial work around by |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
137 |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
138 The "One set of mutable changset == One developer" mantra is also a way to work |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
139 around conflicting rewriting of changeset. If two different people are able to |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
140 |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
141 The git branch model allow to overwrite changeset version by another |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
142 one, but it does not care about divergent version. It is the equivalent |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
143 of "common ftp" source management for changesets. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
144 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
145 Facing The Danger Once And For All |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
146 ------------------------------------------------ |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
147 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
148 Above we saw that, the more effort you put to avoid instability, the more option |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
149 you deny. And even most restrictive work flow can't guarantee that instability |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
150 will never show up! |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
151 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
152 Obsolete marker can handle the job |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
153 ``````````````````````````````````` |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
154 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
155 It is time to provide a full featured solution to deal with |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
156 instability and to stop working around the issue! This is why I |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
157 developing a new feature for mercurial called "Obsolete markers". |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
158 Obsolete markers have two key properties: |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
159 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
160 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
161 * Any "old" changeset we want to get ride of is **explicitly** marked |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
162 as "obsolete" by history rewriting operation. |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
163 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
164 By explicitly marking the obsolete part of the history, we will be able to |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
165 easily detect instability situation. |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
166 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
167 * Relations between old and new version of changesets are tracked by obsolete |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
168 markers. |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
169 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
170 By Storing a meta-history of changeset evolution we are able to easily resolve |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
171 instability and edition conflict [#]_ . |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
172 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
173 .. [#] edition conflict is another major obstable to collaboration. See the |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
174 section dedicated to obsolete marker for details. |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
175 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
176 Improves robustness == improves simplicity |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
177 ```````````````````````````````````````````````` |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
178 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
179 This proposal should **first** be seen as a safety measure. |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
180 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
181 It allow to detect instability as soon as possible |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
182 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
183 :: |
240
ab9ee2eba21e
[doc] fix unstable code block
Pierre-Yves.David@ens-lyon.org
parents:
231
diff
changeset
|
184 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
185 $ hg pull |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
186 added 3 changeset |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
187 +2 unstable changeset |
492
7ecd41520dae
rename `stabilize` to `evolve`
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
365
diff
changeset
|
188 (do you want "hg evolve" ?) |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
189 working directory parent is obsolete! |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
190 $ hg push |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
191 outgoing unstable changesets |
492
7ecd41520dae
rename `stabilize` to `evolve`
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
365
diff
changeset
|
192 (use "hg evolve" or force the push) |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
193 |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
194 And should not not encourage people to create instability |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
195 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
196 :: |
240
ab9ee2eba21e
[doc] fix unstable code block
Pierre-Yves.David@ens-lyon.org
parents:
231
diff
changeset
|
197 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
198 $ hg up 42 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
199 $ hg commit --amend |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
200 changeset have descendant. |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
201 $ hg commit --amend -f |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
202 +5 unstable changeset |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
203 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
204 $ hg rebase -D --rev 40::44 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
205 rebasing already obsolete changeset 42:AAA will conflict with newer version 48:BBB |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
206 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
207 While allowing powerful feature |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
208 ```````````````````````````````````````````````` |
221
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
209 |
d43b72724b84
doc: unstability principle
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
210 |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
211 * Help to automatically solve instability. |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
212 |
365
9f6a77ec66cb
evolve: switch the official name for "kill" to prune
Pierre-Yves.David@ens-lyon.org
parents:
357
diff
changeset
|
213 * "prune" changeset remotely. |
231
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
214 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
215 * track resulting changeset when submitting patch//pull request. |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
216 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
217 * Focus on what you do: |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
218 |
f589d054329a
restore unstability content
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
228
diff
changeset
|
219 I do not like the "all at once" model of history rewriting. I'm comfortable |
357
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
220 with instability and obsolete marker offer all the tool to safely create and |
b398e9c2dbd1
doc: English proofreading
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
243
diff
changeset
|
221 handle instability locally. |
228
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
222 |
5a17c0d41a00
proof-read documentation and docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
227
diff
changeset
|
223 |