comparison docs/index.rst @ 2881:9b270ce3763b

doc-front-page: expand the paragraph about changeset evolution We clarify the part of the explanation about the changeset evolution concept.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 30 Aug 2017 11:25:27 +0200
parents a75b4109239b
children 4b7252600e57
comparison
equal deleted inserted replaced
2880:a75b4109239b 2881:9b270ce3763b
53 user-guide 53 user-guide
54 sharing 54 sharing
55 concepts 55 concepts
56 from-mq 56 from-mq
57 57
58 Why the ``evolve`` extension 58 What is Changeset Evolution ?
59 ---------------------------- 59 -----------------------------
60 60
61 With core Mercurial, changesets are permanent and immutable. You can 61 With core Mercurial, changesets are permanent and immutable. You can
62 commit new changesets to modify your source code, but you cannot 62 commit new changesets to modify your source code, but you cannot
63 modify or remove old changesets. 63 modify or remove old changesets.
64 64
82 Mercurial knows how history has been modified, specifically when 82 Mercurial knows how history has been modified, specifically when
83 one changeset replaces another. In the obsolescence model, a 83 one changeset replaces another. In the obsolescence model, a
84 changeset is neither removed nor modified, but is instead marked 84 changeset is neither removed nor modified, but is instead marked
85 *obsolete* and typically replaced by a *successor*. Obsolete 85 *obsolete* and typically replaced by a *successor*. Obsolete
86 changesets usually become *hidden* as well. Obsolescence is an 86 changesets usually become *hidden* as well. Obsolescence is an
87 invisible feature in Mercurial until you start using ``evolve``. 87 disabled feature in Mercurial until you start using ``evolve``.
88 88
89 Some of the things you can do with ``evolve`` are: 89 Some of the things you can do with ``evolve`` are:
90 90
91 * Fix a mistake immediately: “Oops! I just committed a changeset 91 * Fix a mistake immediately: “Oops! I just committed a changeset
92 with a syntax error—I'll fix that and amend the changeset so no 92 with a syntax error—I'll fix that and amend the changeset so no
93 one sees my mistake.” (While this is possible using existing 93 one sees my mistake.” (While this is possible using default
94 features of core Mercurial, ``evolve`` makes it safer.) 94 features of core Mercurial, changeset evolution makes it safer.)
95 95
96 * Fix a mistake a little bit later: “Oops! I broke the tests three 96 * Fix a mistake a little bit later: “Oops! I broke the tests three
97 commits back, but only noticed it now—I'll just update back to the 97 commits back, but only noticed it now—I'll just update back to the
98 bad changeset, fix my mistake, amend the changeset, and evolve 98 bad changeset, fix my mistake, amend the changeset, and evolve
99 history to update the affected changesets.” 99 history to update the affected changesets.”
111 111
112 * Share mutable history for code review: you don't want to publish 112 * Share mutable history for code review: you don't want to publish
113 unreviewed changesets, but you can't block every commit waiting 113 unreviewed changesets, but you can't block every commit waiting
114 for code review. The solution is to share mutable history with 114 for code review. The solution is to share mutable history with
115 your reviewer, amending each changeset until it passes review. 115 your reviewer, amending each changeset until it passes review.
116
117 * Explore and audit the rewrite history of a changeset. Since Mercurial is
118 tracking the edition you make to a changeset, you can look at the history of
119 these editions. This is similar to Mercurial tracking the history of a file
120 edition, but at the changeset level.
116 121
117 ``evolve`` is experimental! 122 ``evolve`` is experimental!
118 --------------------------- 123 ---------------------------
119 124
120 The long-term plan for ``evolve`` is to add it to core Mercurial. 125 The long-term plan for ``evolve`` is to add it to core Mercurial.