Page MenuHomePhabricator

abort: added support for histedit
ClosedPublic

Authored by taapas1128 on Thu, Jun 27, 3:14 PM.

Details

Summary

This patch adds the support for histedit in hg abort plan.

As seperate hgaborthistedit() function is created to handle
independent calls for abortion of histedit. This function is
then registered as abortfunc for state detection API.

hg abort in case of histedit also supports history-editing-backup
config option.

Results are shown as tests.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

taapas1128 created this revision.Thu, Jun 27, 3:14 PM
taapas1128 updated this revision to Diff 15735.Mon, Jul 1, 5:51 PM
pulkit added a subscriber: pulkit.Tue, Jul 2, 5:45 PM
pulkit added inline comments.
hgext/histedit.py
1922

you need to set locks for the state too. Refer line 1685 in this file.

taapas1128 edited the summary of this revision. (Show Details)Wed, Jul 3, 7:02 PM
taapas1128 updated this revision to Diff 15754.
taapas1128 marked an inline comment as done.Wed, Jul 3, 7:08 PM
taapas1128 updated this revision to Diff 15769.Thu, Jul 4, 5:07 PM
taapas1128 updated this revision to Diff 15782.Sat, Jul 6, 2:55 PM

Looking closely, the backup value comes from reading ui.configbool('rewrite', 'backup-bundle') instead of a --no-backup flag. It means we can get rid of the --backup flag to hg abort as there exists no such flag for histedit.

@pulkit Yeah I know that but look at D3965. histedit once did support --no-backup flag. It was dropped off for a different reason.

@pulkit Yeah I know that but look at D3965. histedit once did support --no-backup flag. It was dropped off for a different reason.

Yeah, so we should respect the config option and not re-introduce the flag.

Okay I will do that. So should I remove --no-backup flag altogether from this series of patches because none of the commands support --no-backup then.

Okay I will do that. So should I remove --no-backup flag altogether from this series of patches because none of the commands support --no-backup then.

Yes please remove. Also it will be nice if you fold all the abort related patches into one except D6608.

taapas1128 edited the summary of this revision. (Show Details)Mon, Jul 8, 2:18 PM
taapas1128 updated this revision to Diff 15807.
taapas1128 edited the summary of this revision. (Show Details)Tue, Jul 9, 8:25 AM
taapas1128 updated this revision to Diff 15834.
pulkit accepted this revision.Wed, Jul 10, 8:43 AM
pulkit added inline comments.
tests/test-histedit-no-backup.t
63

Unwanted new line change, will drop it in flight.

This revision is now accepted and ready to land.Wed, Jul 10, 8:43 AM
This revision was automatically updated to reflect the committed changes.