A Scalable, User-Friendly Source Control System.
Go to file
Yuya Nishihara 44b7401396 demandimport: fix level passed to loader of sub-modules
As the fromlist gives the names of sub-modules, they should be searched in
the parent directory of the package's __init__.py, which is level=1.

I got the following error by rewriting hgweb to use absolute_import, where
the "mercurial" package is referenced as ".." (level=2):

  ValueError: Attempted relative import beyond toplevel package

I know little about the import mechanism, but this change seems correct.
Before this patch, the following code did import the os module with no error:

  from mercurial import demandimport
  demandimport.enable()
  from mercurial import os
  print os.name
2015-11-01 21:19:09 +09:00
contrib packaging: rework version detection and declaration (issue4912) 2015-10-26 14:19:37 -04:00
doc spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
hgext wireproto: move clonebundles command from extension (issue4931) 2015-11-03 12:31:33 -08:00
i18n i18n: make sure to include translation of (DEPRECATED) 2015-11-03 22:44:57 +09:00
mercurial demandimport: fix level passed to loader of sub-modules 2015-11-01 21:19:09 +09:00
tests hooks: back e7b51de6e8eb out 2015-11-06 11:08:11 -05:00
.hgignore hgignore: ignore the PyCharm workspace folder 2014-10-13 11:46:04 +02:00
.hgsigs Added signature for changeset 6146822a39c0 2015-11-01 13:04:14 -06:00
CONTRIBUTORS Add note to CONTRIBUTORS file 2007-11-07 21:10:30 -06:00
COPYING COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
hg hg: add support for HGUNICODEPEDANTRY environment variable 2014-06-23 09:33:07 -04:00
hgeditor spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
hgweb.cgi urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
Makefile makefile: add wheel build target 2015-10-09 12:30:46 -05:00
README urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
setup.py setup: import setup from setuptools if FORCE_SETUPTOOLS is set 2015-10-09 12:25:51 -05:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install:

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing:

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.