( )⚙ D618 largefiles: remove unused assignments from wrapfunction()

This is an archive of the discontinued Mercurial Phabricator instance.

largefiles: remove unused assignments from wrapfunction()
ClosedPublic

Authored by martinvonz on Sep 3 2017, 6:04 PM.

Details

Summary

The return values from wrapfunction() were never used here. Using the
value is also a little tricky and wrappedfunction() should be
preferred, so let's just delete the assignments.

There's also a bunch of return values from wrapcommand() being
assigned to a variable here, but at least that value can be (and is
used after some of the assignments).

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.Sep 3 2017, 6:04 PM
yuja accepted this revision.Sep 4 2017, 9:42 AM
yuja added a subscriber: yuja.

Nice.

This revision is now accepted and ready to land.Sep 4 2017, 9:42 AM
This revision was automatically updated to reflect the committed changes.

Is it acceptable to move the exthelper stuff in evolve into the core somewhere? The fact that there are so many functions and commands wrapped in largefiles makes it harder to read the code. (And sometimes it is a command, cmdutil and a subrepo function that need to be wrapped.) I like the simple annotation method evolve uses. (I'm not sure what to do about the few cases where the return value from these wrappers is used to add an option.)

Is it acceptable to move the exthelper stuff in evolve into the core somewhere? The fact that there are so many functions and commands wrapped in largefiles makes it harder to read the code. (And sometimes it is a command, cmdutil and a subrepo function that need to be wrapped.) I like the simple annotation method evolve uses. (I'm not sure what to do about the few cases where the return value from these wrappers is used to add an option.)

That sounds like an excellent idea! I'm not sure if exthelper needs some cleanup before upstreaming it. I'm gonna take a look at it. Please feel free to send cleanup patches if needed.