This is an archive of the discontinued Mercurial Phabricator instance.

blackbox: simplify ui states
ClosedPublic

Authored by quark on Sep 7 2017, 1:32 AM.

Details

Summary

It seems cleaner to just remove _partialinit, copy, __init__. This
patch makes it so by using getattr in log so those fields do not need to
be existed.

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

quark created this revision.Sep 7 2017, 1:32 AM
durham accepted this revision.Sep 7 2017, 8:22 PM
yuja requested changes to this revision.Sep 12 2017, 10:08 AM
yuja added a subscriber: yuja.

uisetup() only replaces the __class__. Can we be sure that blackboxui.__init__()
was called prior to ui.log() ?

This revision now requires changes to proceed.Sep 12 2017, 10:08 AM
quark added a comment.Sep 12 2017, 2:04 PM

Good catch! I should have been aware of that since that's part of the experience working on chg. I still want to simplify the interface. Maybe we can remove __init__ and copy instead.

quark edited the summary of this revision. (Show Details)Sep 18 2017, 7:03 PM
quark retitled this revision from blackbox: remove _partialinit to blackbox: simplify ui states.
quark updated this revision to Diff 1878.
yuja accepted this revision.Sep 19 2017, 10:33 AM

Looks good.

This revision is now accepted and ready to land.Sep 19 2017, 10:33 AM
This revision was automatically updated to reflect the committed changes.