#pragma section-numbers 2 <> = History Editing Pre-Checking consolidation = '''Status: InProgress''' '''Main proponents: [[Pierre-YvesDavid]], PulkitGoyal, SushilKanchi, GregorySzorc''' A way to reduce the odd for users to be exposed to evolution instability (both for local and distributed workflow). == Goal == Changeset Evolution can automatically detect and solves a lot of the issues that can arise from history rewriting. However, in terms of user experience it is better to prevent them to arise in the first place as much as possible. We already have some some "pre-checking" in place, it should be generalized to make sure that every history rewriting operation uses it and that it cover all the issues we can cover. This plan page aims at: * listing all the situation we want to handle, * define the UI/UX we want for them, * define the technical means to achieve this. == Details == === checks === Things that needs to be checked: * rewriting of public changesets (./) * creation of orphans (configurable (./) /overwritable) * creation of content-divergence (configurable/overwritable) {X} * creation of phase-divergence (configurable/overwritable) {X} * rewriting of changeset non-owned/unrelated-to the current user {X} === API === We also need to make sure any local markers creation goes through this. We could use the follow API for this purporse (Actual name may varies): {{{ with history_rewriting(repo) as evolution_tracker: evolution_tracker.pre_check(some, arguments) work(); work(); work(); evolution_tracker.record_evolution(markers, to, be, created) }}} The `evolution_tracker` tracker become the only way to create local markers, and the markers creation will checks that an appropriate "pre_check" call have been made for the rewritten changesets. === Ownership === The idea is to help preventing content-divergence creation and large impact error in general by detecting when a user is about to rewrites changeset that are not is own. There are two dimension to consider: what changeset should we "protect" ? * By default a changeset is consider "non-owned" is `ctx.username` != `ui.username`. * A config option `ui.altername-username` can define more usernames for the current user. * Another dedicated config option controls the changeset "protected" (e.g. `rewrite.no-warn-edit=pulkit@yandex,babar@savanah.ni`). * A wild-card value removes protection for all changesets `rewrite.no-warn-edit=*` how should we act on ? * By default a prompt is offered to the user: {{{ You are about to rebase 12 changesets of another user, do you want to continue [yN] See `hg help evolution.other-people-change` for details }}} * We can offer an option to plain abort or disable any warning through the config * It might be useful to offer fine grained configuration for various groups of users. == Roadmap == * Add instability detection with basic overwrite through experimental configuration * orphans (./) * content-divergence {X} * phase-divergence {X} * Get all history rewriting command to use pre-checking * amend (in-evolve) {X} * evolve ? (in-evolve) {X} * fold (in-evolve) {X} * metaedit (in-evolve) {X} * pick (in-evolve) {X} * rewind (in-evolve) {X} * split (in-evolve) {X} * topic (in-evolve) {X} * touch (in-evolve) {X} * uncommit (in-evolve) {X} * histedit (in-hgext) {X} * rebase (in-hgext) {X} * commit (in-core) {X} * branch (in-core) {X} * phabsend (in-hgext) {X} * amend (in-hgext) {X} * split (in-hgext) {X} * fold (in-hgext) {X} * uncommit (in-hgext) {X} * absorb (in-hgext) {X} * Make the use of pre-checking mandatory {X} * add ownership related configuration and UX {X} * improve UI/UX around instability prevention to their final state {X} == See Also == * ChangesetEvolutionDevel * ChangesetEvolution ---- CategoryDeveloper CategoryNewFeatures CategoryEvolution