This is an archive of the discontinued Mercurial Phabricator instance.

bundlerepo: move temp bundle creation to a separate function
ClosedPublic

Authored by durham on Aug 8 2017, 8:05 PM.

Details

Summary

A future patch will refactor certain parts of bundlerepo initiatlization such
that we need to create temp bundles from another function. Let's move this to
another function to support that.

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

durham created this revision.Aug 8 2017, 8:05 PM
indygreg requested changes to this revision.Aug 14 2017, 9:40 PM
indygreg added a subscriber: indygreg.
indygreg added inline comments.
mercurial/bundlerepo.py
325–326

Please update this to reflect that it is no longer a closure.

This revision now requires changes to proceed.Aug 14 2017, 9:40 PM
martinvonz added inline comments.
mercurial/bundlerepo.py
322

I think we usually use a "fn" prefix for function arguments. I think "readfn" would be clearer.

krbullock added inline comments.
mercurial/bundlerepo.py
322

I agree, but as it is, this is simple code movement. Usually we like renames to be done in separate changes. Updating the docstring as @indygreg suggests is appropriate, though.

durham edited edge metadata.Aug 23 2017, 3:35 PM
durham updated this revision to Diff 1215.
durham marked 3 inline comments as done.Aug 23 2017, 3:39 PM

I fixed the comment and renamed read to readfn. I know we usually do renames as separate from code moves, but this was a tiny rename (only one use).

This revision was automatically updated to reflect the committed changes.