This is an archive of the discontinued Mercurial Phabricator instance.

rewriteutil: add utility function to check if we can create new unstable cset
ClosedPublic

Authored by pulkit on Nov 23 2017, 5:39 PM.

Details

Summary

This patch adds a new file which will contain utility functions related to
rewritting changesets. It also adds a utility function to check if the
rewritting operation creates new unstable changesets and are we allowed to
create them.

This rewriteutil.py introduced in this patch and the utility functions added in
the upcoming patches exists in the evolve extension are being ported from there.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Nov 23 2017, 5:39 PM
dlax added a subscriber: dlax.Nov 24 2017, 4:35 AM

This rewriteutil.py introduced in this patch and the utility functions added in the upcoming patches exists in the evolve extension are being ported from there.

Is it worth porting this alone if nothing in core makes use of this module?
Or is there a larger plan?

pulkit updated this revision to Diff 3899.Nov 27 2017, 7:37 PM
In D1502#25341, @dlax wrote:

This rewriteutil.py introduced in this patch and the utility functions added in the upcoming patches exists in the evolve extension are being ported from there.

Is it worth porting this alone if nothing in core makes use of this module?
Or is there a larger plan?

I have updated the series with couple of usages. More functions will be introduced which will be used by both core and extensions.

dlax requested changes to this revision.Nov 28 2017, 4:18 AM
dlax added inline comments.
mercurial/rewriteutil.py
20

typo: allounstable

This revision now requires changes to proceed.Nov 28 2017, 4:18 AM
pulkit updated this revision to Diff 3911.Nov 28 2017, 2:14 PM
dlax accepted this revision.Nov 28 2017, 2:25 PM
durin42 accepted this revision.Dec 5 2017, 5:52 PM
This revision is now accepted and ready to land.Dec 5 2017, 5:52 PM
This revision was automatically updated to reflect the committed changes.