Skip to content
Snippets Groups Projects
  1. Oct 23, 2013
  2. Oct 24, 2013
  3. Oct 23, 2013
  4. Oct 17, 2013
  5. Oct 23, 2013
  6. Oct 21, 2013
  7. Oct 23, 2013
  8. Oct 21, 2013
  9. Oct 22, 2013
  10. Oct 21, 2013
  11. Oct 13, 2013
    • David Soria Parra's avatar
      pager: honour internal aliases · 7d99bff0f77c
      David Soria Parra authored
      If paging is configured for a command all it's internal defined aliases
      will be paged as well. This will make attend=log cause 'hg history'
      to run the pager. However custom aliases will not be paged by default.
      7d99bff0f77c
  12. Oct 20, 2013
  13. Oct 03, 2013
  14. Oct 04, 2013
    • Katsunori FUJIWARA's avatar
      demandimport: allow extensions to import own modules by absolute name · 621a26eb3a99
      Katsunori FUJIWARA authored
      Before this patch, python modules of each extensions can't import
      another one in own extension by absolute name, because root modules of
      each extensions are loaded with "hgext_" prefix.
      
      For example, "import extroot.bar" in "extroot/foo.py" of "extroot"
      extension fails, even though "import bar" in it succeeds.
      
      Installing extensions into site-packages of python library path can
      avoid this problem, but this solution is not reasonable in some cases:
      using binary package of Mercurial on Windows, for example.
      
      This patch retries to import with "hgext_" prefix after ImportError,
      if the module in the extension may try to import another one in own
      extension.
      
      This patch doesn't change some "_import()"/"_origimport()" invocations
      below, because ordinary extensions shouldn't cause such invocations.
      
          - invocation of "_import()" when root module imports sub-module by
            absolute path without "fromlist"
      
            for example, "import a.b" in "a.__init__.py".
      
            extensions are loaded with "hgext_" prefix, and this causes
            execution of another (= fixed by this patch) code path.
      
          - invocation of "_origimport()" when "level != -1" with "fromlist"
      
            for example, importing after "from __future__ import
            absolute_import" (level == 0), or "from . import b" or "from .a
            import b" (0 < level),
      
            for portability between python versions and environments,
            extensions shouldn't cause "level != -1".
      621a26eb3a99
    • Katsunori FUJIWARA's avatar
      demandimport: support "absolute_import" for external libraries (issue4029) · e3a5922e18c3
      Katsunori FUJIWARA authored
      Before this patch, demandimport of Mercurial may fail to load external
      libraries using "from __future__ import absolute_import": for example,
      importing "foo" in "bar.baz" module will load "bar.foo" if it exists,
      even though "absolute_import" is enabled in "bar.baz" module.
      
      So, extensions for Mercurial can't use such external libraries.
      
      This patch saves "level" of import request for on-demand module
      loading in the future: default value of level is -1, and level is 0
      when "absolute_import" is enabled.
      
      "level" value is passed to built-in import function in
      "_demandmod._load()" and it should load target module correctly.
      
      This patch changes only one "_demandmod" construction case other than
      cases below:
      
          - construction in "_demandmod._load()"
      
            this code path should be used only in relative sub-module
            loading case
      
          - constructions other than patched one in"_demandimport()"
      
            these code paths shouldn't be used in "level != -1" case
      e3a5922e18c3
    • Katsunori FUJIWARA's avatar
      hghave: add "py3k" feature to check whether test runs with Python 3.x · 8bbe208c1812
      Katsunori FUJIWARA authored
      This patch adds "py3k" feature to check whether test runs with Python
      3.x.
      
      This check is needed for portability of test code: for example, in the
      default, modules are imported relatively first with python 2.x, but
      imported absolutely with Python 3.x.
      8bbe208c1812
    • Katsunori FUJIWARA's avatar
      hghave: add "absimport" feature to check "absolute_import" in __future__ · b8316878a685
      Katsunori FUJIWARA authored
      This patch adds "absimport" feature to check whether "absolute_import"
      exists in __future__, which means supporting module loading by
      absolute name.
      
      This check is needed for portability of test code using
      "absolute_import", because Python earlier than 2.5 doesn't support it.
      b8316878a685
  15. Oct 02, 2013
    • Siddharth Agarwal's avatar
      merge: exit early during a no-op update (BC) · ab2362e1672e
      Siddharth Agarwal authored
      hg update . (or equivalents) are effectively no-ops in just about all
      circumstances.  These sorts of updates can be especially common in a
      bookmark-oriented workflow. This saves us a status check and a manifest
      decompression, which means that on a repo with over 210,000 files, this brings
      hg update . down from 2.5 seconds to 0.15.
      
      There is one change in behavior: a file that was added, not committed, and then
      deleted but not removed used to be removed from the dirstate. With this patch
      it isn't. This is what causes the change in test-mq-qpush-exact.t. This seems
      like it's enough of an edge case to not be worth handling.
      
      The output of test-empty.t changes because those files are not yet created.
      ab2362e1672e
  16. Oct 17, 2013
    • Katsunori FUJIWARA's avatar
      localrepo: invoke only feature setup functions for enabled extensions · d1ac3790e10a
      Katsunori FUJIWARA authored
      Before this patch, each feature setup functions for localrepository
      class should examine whether corresponding extension is enabled or not
      by themselves.
      
      This patch invokes only feature setup functions defined in module of
      enabled extensions, and it makes implementation of feature setup
      functions easier and simpler.
      d1ac3790e10a
  17. Oct 02, 2013
  18. Oct 14, 2013
    • Pierre-Yves David's avatar
      rebase: preserve active bookmark when not at head (issue3813) · 0f99747202f9
      Pierre-Yves David authored
      Now that the working directory parent is preserved, we can preserve the active
      bookmark too.
      0f99747202f9
    • Pierre-Yves David's avatar
      rebase: preserve working directory parent (BC) · 9c78ed396075
      Pierre-Yves David authored
      Prior to this changeset, rebase always left the working directory as a parent of
      the last rebased changeset. The is dubious when, before the rebase, the working
      directory was not a parent of the tip most rebased changeset.
      
      With this changeset, we move the working directory back to its original parent.
      If the original parent was rebased, we use it's successors.
      
      This is a step toward solving issue3813 (rebase loses active bookmark if it's
      not on a head)
      9c78ed396075
    • Pierre-Yves David's avatar
      tests: prepare rebase test for wc parent preservation · c23c62209cc4
      Pierre-Yves David authored
      In the way to solving issue3813 we'll preserve the working directory parent
      after the rebase. Multiple rebases test expect the working directory parent to
      be tip after rebase. We patches them before the actual change to prevent
      confusion.
      c23c62209cc4
  19. Oct 18, 2013
  20. Oct 20, 2013
  21. Oct 10, 2013
Loading