Differences between revisions 2 and 3
Revision 2 as of 2019-11-12 01:21:26
Size: 4055
Comment:
Revision 3 as of 2019-11-12 12:33:36
Size: 4063
Editor: DenisLaxalde
Comment: spellcheck + formatting
Deletions are marked like this. Additions are marked like this.
Line 55: Line 55:
* By default a changeset is consider "non-owned" is `ctx.username` != `ui.username`.
* A config option `ui.altername-username` can define more username for the current users.
* Another decidated config option controle the changeset "protected" (eg: `rewrite.no-warn-edit=pulkit@yandex,babar@savanah.ni`).
* A wild-card value remove protection for all changesets `rewrite.no-warn-edit=*`
 * 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=*`
Line 62: Line 62:
 * By default a promt is offered to the user:
{{{
 * By default a prompt is offered to the user:
  {{{
Line 66: Line 66:
}}}

 
* 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 variosu group of users.
  }}}
 * 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.

Note:

This page is primarily intended for developers of Mercurial.

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).

1. 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.

2. Details

2.1. 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}

2.2. 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.

2.3. 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.

3. 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}

4. See Also


CategoryDeveloper CategoryNewFeatures CategoryEvolution

CEDPrecheckPlan (last edited 2019-11-12 12:33:36 by DenisLaxalde)