Fix hgext3rd/__init__.py to make sure it is a namespace package
Summary:
According to the comments hg-crew, hgext3rd is supposed to be a namespace
package, so that extensions can be found in multiple different hgext3rd
directories.
However, the hgext3rd directory in fb-hgext has an empty __init__.py file,
which turns hgext3rd into a plain package instead of a namespace package,
preventing other hgext3rd directories from being found.
This fixes the __init__.py file to perform proper namespace package
initialization, as is done in the hg-crew/hgext3rd/__init__.py file
Test Plan:
Deployed this file on my server and confirmed that extensions in other hgext3rd
directories in $PYTHONPATH are still found correctly.
Reviewers: rmcelroy, durham, quark
Reviewed By: quark
Subscribers: net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3746098
Tasks: 12792845
Signature: t1:3746098:1471679643:44a274807d3598a670e1742dee4cc2654f6bad97
2016-08-23 03:39:02 +03:00
|
|
|
from __future__ import absolute_import
|
|
|
|
import pkgutil
|
|
|
|
# Indicate that hgext3rd is a namspace package, and other python path
|
|
|
|
# directories may still be searched for hgext3rd extensions.
|
|
|
|
__path__ = pkgutil.extend_path(__path__, __name__)
|
2016-12-20 03:34:49 +03:00
|
|
|
|
|
|
|
### IMPORTANT ###
|
|
|
|
# Do not add logic here that would diverge from mercurial's
|
|
|
|
# hgext3rd/__init__.py, the installed version of the file on debian systems is
|
|
|
|
# provided by mercurial itself; the packaging rules for remotefilelog explicitly
|
|
|
|
# ignore the file you're reading now.
|