| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>Safely rewriting history (EXPERIMENTAL)</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="safely-rewriting-history-experimental"> |
| 12 |
<span id="topic-evolution"></span> |
| 13 |
<h1 class="title">Safely rewriting history (EXPERIMENTAL)</h1> |
| 14 |
|
| 15 |
<div class="contents htmlonly topic" id="contents"> |
| 16 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 17 |
<ul class="simple"> |
| 18 |
<li><a class="reference internal" href="#current-feature-status" id="toc-entry-1">Current feature status</a></li> |
| 19 |
<li><a class="reference internal" href="#instability" id="toc-entry-2">Instability</a></li> |
| 20 |
</ul> |
| 21 |
</div> |
| 22 |
<p id="evolution">Obsolescence markers make it possible to mark changesets that have been |
| 23 |
deleted or superseded in a new version of the changeset.</p> |
| 24 |
<p>Unlike the previous way of handling such changes, by stripping the old |
| 25 |
changesets from the repository, obsolescence markers can be propagated |
| 26 |
between repositories. This allows for a safe and simple way of exchanging |
| 27 |
mutable history and altering it after the fact. Changeset phases are |
| 28 |
respected, such that only draft and secret changesets can be altered (see |
| 29 |
<a class="reference external" href="topic-phases.html"><tt class="docutils literal">hg help phases</tt></a> for details).</p> |
| 30 |
<p>Obsolescence is tracked using "obsolescence markers", a piece of metadata |
| 31 |
tracking which changesets have been made obsolete, potential successors for |
| 32 |
a given changeset, the moment the changeset was marked as obsolete, and the |
| 33 |
user who performed the rewriting operation. The markers are stored |
| 34 |
separately from standard changeset data can be exchanged without any of the |
| 35 |
precursor changesets, preventing unnecessary exchange of obsolescence data.</p> |
| 36 |
<p>The complete set of obsolescence markers describes a history of changeset |
| 37 |
modifications that is orthogonal to the repository history of file |
| 38 |
modifications. This changeset history allows for detection and automatic |
| 39 |
resolution of edge cases arising from multiple users rewriting the same part |
| 40 |
of history concurrently.</p> |
| 41 |
<div class="section" id="current-feature-status"> |
| 42 |
<h1><a class="toc-backref" href="#contents">Current feature status</a></h1> |
| 43 |
<p>This feature is still in development.</p> |
| 44 |
</div> |
| 45 |
<div class="section" id="instability"> |
| 46 |
<h1><a class="toc-backref" href="#contents">Instability</a></h1> |
| 47 |
<p>Rewriting changesets might introduce instability.</p> |
| 48 |
<p>There are two main kinds of instability: orphaning and diverging.</p> |
| 49 |
<p>Orphans are changesets left behind when their ancestors are rewritten. |
| 50 |
Divergence has two variants:</p> |
| 51 |
<ul class="simple"> |
| 52 |
<li>Content-divergence occurs when independent rewrites of the same changesets |
| 53 |
lead to different results.</li> |
| 54 |
<li>Phase-divergence occurs when the old (obsolete) version of a changeset |
| 55 |
becomes public.</li> |
| 56 |
</ul> |
| 57 |
<p>It is possible to prevent local creation of orphans by using the following config:</p> |
| 58 |
<pre class="literal-block"> |
| 59 |
[experimental] |
| 60 |
evolution.createmarkers = true |
| 61 |
evolution.exchange = true |
| 62 |
</pre> |
| 63 |
<p>You can also enable that option explicitly:</p> |
| 64 |
<pre class="literal-block"> |
| 65 |
[experimental] |
| 66 |
evolution.createmarkers = true |
| 67 |
evolution.exchange = true |
| 68 |
evolution.allowunstable = true |
| 69 |
</pre> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
</body> |
| 73 |
</html> |