This is an archive of the discontinued Mercurial Phabricator instance.

histedit: create transaction outside of try
ClosedPublic

Authored by martinvonz on Jul 12 2017, 5:38 PM.

Details

Summary

Just a little refactoring to simplify the next patch.

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

martinvonz created this revision.Jul 12 2017, 5:38 PM
martinvonz updated this revision to Diff 99.Jul 12 2017, 7:58 PM
dsp accepted this revision.Jul 13 2017, 11:17 AM
durham accepted this revision.Jul 13 2017, 3:52 PM
durham added a subscriber: durham.
durham added inline comments.
hgext/histedit.py
1117

It might be more technically correct to do this after state.write() happens. state.write() is intended to be called before the transaction, and it only technically works right here because it's ignoring the pending transaction (which could be fixed in the future).

martinvonz marked an inline comment as done.Jul 13 2017, 4:01 PM
martinvonz updated this revision to Diff 115.
martinvonz added inline comments.Jul 13 2017, 4:01 PM
hgext/histedit.py
1117

Good point. I did notice that state.write(). Not sure why I didn't place this after.

This revision was automatically updated to reflect the committed changes.