mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 17:58:27 +03:00
f623fe9d3c
Summary: The old mercurial.dispatch entry point works, except it breaks extensions wrapping `dispatch.*` (ex. `dispatch.runcommand`). That is because things happen in this order: - Buck's python wrapper imports `mercurial.dispatch` as mod1. - hgdemandimport is enabled. - An extension imports `mercurial.dispatch` and it got mod2. - mod2 != mod1. So any changes to mod2 won't be used. Using a separate module (`mercurial.main`) as the entry point solves the problem. Reviewed By: DurhamG Differential Revision: D6879873 fbshipit-source-id: 9779edac64bbeb53dd98dfab1b21575c3a60af01
13 lines
337 B
Python
13 lines
337 B
Python
# Copyright 2018 Facebook, Inc.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
from __future__ import absolute_import
|
|
|
|
if __name__ == '__main__':
|
|
import hgdemandimport
|
|
hgdemandimport.enable()
|
|
from . import dispatch
|
|
dispatch.run()
|