upgrade: import 'localrepo' globally
The in-function imports mention a cycle that seems to no longer be relevant. As
a result, we just import it globally.
largefiles: set the extension as enabled locally after a share requiring it
This has been done for clone since
e1dbe0b215ae, so it makes sense here for the
same reasons.