This is an archive of the discontinued Mercurial Phabricator instance.

rewriteutil: add configurable check to disallow obsoleting someone else cset
Needs RevisionPublic

Authored by pulkit on Oct 8 2019, 3:25 PM.

Details

Reviewers
baymax
Group Reviewers
hg-reviewers
Summary

One of the things about obsolete markers (especially prune markers) is that
sharing them can lead to cases where you loose your data. The best example is
that someone else prune your changeset and you pull from them and your commit
disappears locally.

There are two parts of solving the above mentioned problem:

  1. disallow obsoleting changesets which are not authored by you unless some

config or force is passed

  1. notifying the end user and creating a journal of obsolete markers which the

user recieves on their cset from someone else

This patch tries to tackle the first one.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Oct 8 2019, 3:25 PM

This should probably be controled by a config option instead of a keyword argument to this function (we want the control of this to be unified)

I would prefer a prompt than an abort.

We talked about the pre-checking topic with Sushil on Sunday. The result of the discussion is synthetised in this plan page: https://www.mercurial-scm.org/wiki/CEDPrecheckPlan

baymax requested changes to this revision.Jan 24 2020, 12:31 PM

There seems to have been no activities on this Diff for the past 3 Months.

By policy, we are automatically moving it out of the need-review state.

Please, move it back to need-review without hesitation if this diff should still be discussed.

:baymax:need-review-idle:

This revision now requires changes to proceed.Jan 24 2020, 12:31 PM