( )⚙ D165 uncommit: keep parent phase for full uncommit

This is an archive of the discontinued Mercurial Phabricator instance.

uncommit: keep parent phase for full uncommit
ClosedPublic

Authored by mbthomas on Jul 21 2017, 7:43 AM.
Tags
None
Subscribers

Details

Reviewers
ryanmce
Group Reviewers
Restricted Project
Commits
rFBHGXf6510b66b72e: uncommit: keep parent phase for full uncommit
Summary

When fully uncommitting a commit on top of a public commit, uncommit
erroneously marks the new current commit with the same phase as the old
commit. It should only do that in the case of a partial commit,
where the new current commit is a new commit.

Test Plan

Add tests to test-uncommit.t.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Branch
mbt-uncommit (bookmark) on default (branch)
Lint
Lint OK
Unit
Unit Tests OK

Event Timeline

mbthomas created this revision.Jul 21 2017, 7:43 AM

I think you can make this change more surgical by just checking the hash at the caller.

hgext3rd/uncommit.py
166

Rather than passing back an additional parameter , can't we check if the newid is old.parent's hash? Then this change will be less invasive.

mbthomas updated this revision to Diff 359.Jul 21 2017, 8:19 AM

Compare IDs to determine if the new current commit is new

mbthomas marked an inline comment as done.Jul 21 2017, 8:20 AM
ryanmce accepted this revision.Jul 21 2017, 8:25 AM

awesome, thanks for the fix!

This revision is now accepted and ready to land.Jul 21 2017, 8:25 AM
This revision was automatically updated to reflect the committed changes.