Mercurial > hg
view CONTRIBUTORS @ 34413:014d467f9d08
effectflag: store an empty effect flag for the moment
The idea behind effect flag is to store additional information in obs-markers
about what changed between a changeset and its successor(s). It's a low-level
information that comes without guarantees.
This information can be computed a posteriori, but only if we have all
changesets locally. This is not the case with distributed workflows where you
work with several people or on several computers (eg: laptop + build server).
Storing the effect-flag as a bitfield has several advantages:
- It's compact, we are using one byte per obs-marker at most for the effect-
flag.
- It's compoundable, the obsfate log approach needs to display evolve history
that could spans several obs-markers. Computing the effect-flag between a
changeset and its grand-grand-grand-successor is simple thanks to the
bitfield.
The effect-flag design has also some limitations:
- Evolving a changeset and reverting these changes just after would lead to
two obs-markers with the same effect-flag without information that the first
and third changesets are the same.
The effect-flag current design is a trade-off between compactness and
usefulness.
Storing this information helps commands to display a more complete and
understandable evolve history. For example, obslog (an Evolve command) use it
to improve its output:
x 62206adfd571 (34302) obscache: skip updating outdated obscache...
| rewritten(parent) by Matthieu Laneuville <matthieu.laneuville@octobus...
| rewritten(content) by Boris Feld <boris.feld@octobus.net>
The effect flag is stored in obs-markers metadata while we iterate on the
information we want to store. We plan to extend the existing obsmarkers
bit-field when the effect flag design will be stabilized.
It's different from the CommitCustody concept, effect-flag are not signed and
can be forged. It's also different from the operation metadata as the command
name (for example: amend) could alter a changeset in different ways (changing
the content with hg amend, changing the description with hg amend -e, changing
the user with hg amend -U). Also it's compatible with every custom command
that writes obs-markers without needing to be updated.
The effect-flag is placed behind an experimental flag set to off by default.
Hook the saving of effect flag in create markers, but store only an empty one
for the moment, I will refine the values in effect flag in following patches.
For more information, see:
https://www.mercurial-scm.org/wiki/ChangesetEvolutionDevel#Record_types_of_operation
Differential Revision: https://phab.mercurial-scm.org/D533
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 06 Jul 2017 14:50:17 +0200 |
parents | c29efd272395 |
children |
line wrap: on
line source
[This file is here for historical purposes, all recent contributors should appear in the changelog directly] Andrea Arcangeli <andrea at suse.de> Thomas Arendsen Hein <thomas at intevation.de> Goffredo Baroncelli <kreijack at libero.it> Muli Ben-Yehuda <mulix at mulix.org> Mikael Berthe <mikael at lilotux.net> Benoit Boissinot <bboissin at gmail.com> Brendan Cully <brendan at kublai.com> Vincent Danjean <vdanjean.ml at free.fr> Jake Edge <jake at edge2.net> Michael Fetterman <michael.fetterman at intel.com> Edouard Gomez <ed.gomez at free.fr> Eric Hopper <hopper at omnifarious.org> Alecs King <alecsk at gmail.com> Volker Kleinfeld <Volker.Kleinfeld at gmx.de> Vadim Lebedev <vadim at mbdsys.com> Christopher Li <hg at chrisli.org> Chris Mason <mason at suse.com> Colin McMillen <mcmillen at cs.cmu.edu> Wojciech Milkowski <wmilkowski at interia.pl> Chad Netzer <chad.netzer at gmail.com> Bryan O'Sullivan <bos at serpentine.com> Vicent SeguĂ Pascual <vseguip at gmail.com> Sean Perry <shaleh at speakeasy.net> Nguyen Anh Quynh <aquynh at gmail.com> Ollivier Robert <roberto at keltia.freenix.fr> Alexander Schremmer <alex at alexanderweb.de> Arun Sharma <arun at sharma-home.net> Josef "Jeff" Sipek <jeffpc at optonline.net> Kevin Smith <yarcs at qualitycode.com> TK Soh <teekaysoh at yahoo.com> Radoslaw Szkodzinski <astralstorm at gorzow.mm.pl> Samuel Tardieu <sam at rfc1149.net> K Thananchayan <thananck at yahoo.com> Andrew Thompson <andrewkt at aktzero.com> Michael S. Tsirkin <mst at mellanox.co.il> Rafael Villar Burke <pachi at mmn-arquitectos.com> Tristan Wibberley <tristan at wibberley.org> Mark Williamson <mark.williamson at cl.cam.ac.uk>