Page MenuHomePhabricator

branchmap: updating triggers a write
ClosedPublic

Authored by mjpieters on Jan 21 2019, 1:08 PM.

Details

Summary

Rather than separate updating and writing, create a subclass that doesn't write
on update. This minimises chances we forget to write out updates somewhere.

This also makes refactoring and improving the branchmap functionality easier.

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

mjpieters created this revision.Jan 21 2019, 1:08 PM
martinvonz added inline comments.
mercurial/discovery.py
242–243

Indentation seems bad (seemed bad before too)

mjpieters added inline comments.Jan 26 2019, 8:19 AM
mercurial/discovery.py
242–243

It's a generator expression as single argument. I was deliberately not making style changes in these patches, so I didn't touch the indentation here.

If / when we auto-format code with black or something else, this'll be cleared up then, right?

pulkit accepted this revision.Feb 5 2019, 11:30 AM
This revision was automatically updated to reflect the committed changes.