D6876: phabricator: support automatically obsoleting old revisions of pulled commits

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Oct 8 06:17:06 EDT 2019


marmoute added inline comments.

INLINE COMMENTS

> mharbison72 wrote in phabricator.py:187
> It looks like, based on the loop where it's used, it will obsolete //all// (non public) commits that match.  The only way I can think of where that happens is if I `phabimport` someone else's patches, they make updates, and then I `phabimport` again.  That's why I was wondering aloud about doing this on import, but if the eventual pull cleans it all up, that may be sufficient for the use case I had in mind.  I don't see how a developer would do that on their own commits with amend and friends.
> 
> Do you have any ideas to detect phase divergence?  And can that even happen if we're ignoring public commits?

User  A phasend a patch

- User A phasend a changeset `A` as D1337 <https://phab.mercurial-scm.org/D1337>
- User B phabimport D1337 <https://phab.mercurial-scm.org/D1337>, rebase (as `A'`) and pushes
- User A fix critical bug in D1337 <https://phab.mercurial-scm.org/D1337> and amend it as `A''`
- User A pull the **old** version of D1337 <https://phab.mercurial-scm.org/D1337> without the fix.

If we obsolete the **new** version of D1337 <https://phab.mercurial-scm.org/D1337> (`A''`), we are silently dropping the fix to the critical bug.

If markers were properly exchange, the evolution machinery would detect the divergence, warn the user and be able to automatically solve it. Preserving the fix to the criticial bug.

> mharbison72 wrote in phabricator.py:216
> Agreed.
> 
> I saw mention of the archived phase the other day; how would that (and other special phases) play here?

Thing could be in `secret` phase too.

> mharbison72 wrote in phabricator.py:225
> You mean //after// locking, correct?

I do mean **after** locking (sorry)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6876/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6876

To: mharbison72, #hg-reviewers
Cc: pulkit, sheehan, Kwan, mercurial-devel, marmoute


More information about the Mercurial-devel mailing list