Skip to content
Snippets Groups Projects
  1. May 31, 2015
  2. May 27, 2015
    • Martin von Zweigbergk's avatar
      treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?' · 20ad936a
      Martin von Zweigbergk authored
      For globs like 'foo/ba?', match._roots() will return 'foo'. Since
      visitdir(), excludes directories in the excluded roots, it would skip
      the entire foo directory. This is incorrect, since 'foo/ba?' doesn't
      mean that everything in foo/ should be exluded. Note that visitdir()
      is called only from the treemanifest class, so this only affects tree
      manifests. Fix by adding roots to the set of excluded roots only if
      there are no excluded patterns.
      
      Since 'glob' is the default pattern type for globs, we also need to
      update some -X patterns in the tests to be of 'path' type to take
      advantage of the visitdir tricks. For consistency, also update the -I
      patterns.
      
      It seems a little unfortunate that 'foo' in 'hg files -X foo' is
      considered a pattern because of the implied 'glob' type, but improving
      that is left for another day.
      20ad936a
  3. May 29, 2015
  4. May 27, 2015
    • Laurent Charignon's avatar
      record: add default value for operation argument · 724421cb
      Laurent Charignon authored
      This patch is part of a series of patches to change the recording ui to reflect
      the operation currently running (commit, shelve, revert ...).
      This patch adds the default value of the operation argument for record's
      standard and curses interface to match what is displayed in the interface
      as of today.
      724421cb
  5. May 28, 2015
  6. May 27, 2015
  7. May 29, 2015
    • Laurent Charignon's avatar
      revert: remove unused debug code in the test file · 48b1d894
      Laurent Charignon authored
      I left a test environment variable in a previous commit and it is doing nothing
      useful. This patch removes it.
      48b1d894
    • Ryan McElroy's avatar
      commands: rename current to active in variables and comments · 62da2d77
      Ryan McElroy authored
      Today, the terms 'active' and 'current' are interchangeably used throughout the
      codebase in reference to the active bookmark (the bookmark that will be updated
      with the next commit). This leads to confusion among developers and users.
      This patch is part of a series to standardize the usage to 'active' throughout
      the mercurial codebase and user interface.
      62da2d77
    • Ryan McElroy's avatar
      templatekw: introduce active subkeyword from bookmarks keyword · f26efa4f
      Ryan McElroy authored
      Today, the terms 'active' and 'current' are interchangeably used throughout the
      codebase in reference to the active bookmark (the bookmark that will be updated
      with the next commit). This leads to confusion among developers and users.
      This patch is part of a series to standardize the usage to 'active' throughout
      the mercurial codebase and user interface.
      f26efa4f
  8. Apr 16, 2015
    • Ryan McElroy's avatar
      bookmarks: name label for active bookmark correctly · ceec79b5
      Ryan McElroy authored
      Retain old label as well for backwards compatibility.
      
      Today, the terms 'active' and 'current' are interchangeably used throughout the
      codebase in reference to the active bookmark (the bookmark that will be updated
      with the next commit). This leads to confusion among developers and users.
      This patch is part of a series to standardize the usage to 'active' throughout
      the mercurial codebase and user interface.
      ceec79b5
  9. May 29, 2015
  10. May 17, 2015
    • Yuya Nishihara's avatar
      revset: add fast path for _list() of integer revisions · ceaf04bb
      Yuya Nishihara authored
      This can greatly speed up chained 'or' of integer revisions.
      
      1) reduce nesting of chained 'or' operations
      2) optimize to a list
      3) fast path for integer revisions (this patch)
      
      revset #0: 0 + 1 + 2 + ... + 1000
      1) wall 0.483341 comb 0.480000 user 0.480000 sys 0.000000 (best of 20)
      2) wall 0.025393 comb 0.020000 user 0.020000 sys 0.000000 (best of 107)
      3) wall 0.008371 comb 0.000000 user 0.000000 sys 0.000000 (best of 317)
      
      revset #1: sort(0 + 1 + 2 + ... + 1000)
      1) wall 0.035240 comb 0.040000 user 0.040000 sys 0.000000 (best of 100)
      2) wall 0.026432 comb 0.030000 user 0.030000 sys 0.000000 (best of 102)
      3) wall 0.008418 comb 0.000000 user 0.000000 sys 0.000000 (best of 322)
      
      revset #2: first(0 + 1 + 2 + ... + 1000)
      1) wall 0.028949 comb 0.030000 user 0.030000 sys 0.000000 (best of 100)
      2) wall 0.025503 comb 0.030000 user 0.030000 sys 0.000000 (best of 106)
      3) wall 0.008423 comb 0.010000 user 0.010000 sys 0.000000 (best of 319)
      
      But I admit that it is still slower than the spanset.
      
      revset #3: 0:1000
      3) wall 0.000132 comb 0.000000 user 0.000000 sys 0.000000 (best of 19010)
      ceaf04bb
    • Yuya Nishihara's avatar
      revset: optimize 'or' operation of trivial revisions to a list · 7fbef793
      Yuya Nishihara authored
      As seen in issue4565 and issue4624, GUI wrappers and automated scripts are
      likely to generate a long query that just has numeric revisions joined by 'or'.
      One reason why is that they allows users to choose arbitrary revisions from
      a list. Because this use case isn't handled well by smartset, let's optimize
      it to a plain old list.
      
      Benchmarks:
      
      1) reduce nesting of chained 'or' operations
      2) optimize to a list (this patch)
      
      revset #0: 0 + 1 + 2 + ... + 1000
      1) wall 0.483341 comb 0.480000 user 0.480000 sys 0.000000 (best of 20)
      2) wall 0.025393 comb 0.020000 user 0.020000 sys 0.000000 (best of 107)
      
      revset #1: sort(0 + 1 + 2 + ... + 1000)
      1) wall 0.035240 comb 0.040000 user 0.040000 sys 0.000000 (best of 100)
      2) wall 0.026432 comb 0.030000 user 0.030000 sys 0.000000 (best of 102)
      
      revset #2: first(0 + 1 + 2 + ... + 1000)
      1) wall 0.028949 comb 0.030000 user 0.030000 sys 0.000000 (best of 100)
      2) wall 0.025503 comb 0.030000 user 0.030000 sys 0.000000 (best of 106)
      7fbef793
  11. May 29, 2015
  12. May 24, 2015
  13. May 29, 2015
  14. May 27, 2015
  15. May 29, 2015
  16. May 28, 2015
    • Jordi Gutiérrez Hermoso's avatar
      dispatch: disable demandimport for the --debugger option · 101e8412
      Jordi Gutiérrez Hermoso authored
      Something in Python 2.7.9 or so broke the --debugger option with
      ui.debugger = ipdb. I get the traceback below. There is some apparent
      confusion with demandimport. This should be disabled anyway for the
      --debugger option. The debugger must be imported right away, before
      any other dispatch. There's no benefit in delaying the debugger
      import.
      
      This patch uses the demandimport.deactivated() context manager.
      
        Traceback (most recent call last):
          File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 121, in _runcatch
            debugmod = __import__(debugger)
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 115, in _demandimport
            return _hgextimport(_import, name, globals, locals, fromlist, level)
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport
            return importfunc(name, globals, *args)
          File "/usr/lib/python2.7/dist-packages/ipdb/__init__.py", line 16, in <module>
            from ipdb.__main__ import set_trace, post_mortem, pm, run, runcall, runeval, launch_ipdb_on_exception
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 134, in _demandimport
            mod = _hgextimport(_origimport, name, globals, locals)
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport
            return importfunc(name, globals, *args)
          File "/usr/lib/python2.7/dist-packages/ipdb/__main__.py", line 29, in <module>
            if IPython.__version__ > '0.10.2':
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 106, in __getattribute__
            self._load()
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 78, in _load
            mod = _hgextimport(_import, head, globals, locals, None, level)
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport
            return importfunc(name, globals, *args)
          File "/usr/lib/python2.7/dist-packages/IPython/__init__.py", line 45, in <module>
            from .config.loader import Config
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 132, in _demandimport
            return _origimport(name, globals, locals, fromlist, level)
          File "/usr/lib/python2.7/dist-packages/IPython/config/__init__.py", line 16, in <module>
            from .application import *
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 115, in _demandimport
            return _hgextimport(_import, name, globals, locals, fromlist, level)
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport
            return importfunc(name, globals, *args)
          File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 30, in <module>
            from IPython.external.decorator import decorator
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 134, in _demandimport
            mod = _hgextimport(_origimport, name, globals, locals)
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport
            return importfunc(name, globals, *args)
          File "/usr/lib/python2.7/dist-packages/IPython/external/decorator/__init__.py", line 2, in <module>
            from decorator import *
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 115, in _demandimport
            return _hgextimport(_import, name, globals, locals, fromlist, level)
          File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport
            return importfunc(name, globals, *args)
          File "/usr/lib/python2.7/dist-packages/decorator.py", line 240, in <module>
            'ContextManager', (_GeneratorContextManager,), dict(__call__=__call__))
      101e8412
    • Jordi Gutiérrez Hermoso's avatar
      hooks: replace if-try-finally with a "with" statement · 2cfb0bbf
      Jordi Gutiérrez Hermoso authored
      This seems like a textbook case for the new demandimport.deactivated
      context manager: check if something must be done, do it, and cleanup
      at the end regardless of exceptions.
      
      The diff isn't as bad as it seems. It's just all the whitespace
      changes due to needing an extra level of indentation. It looks cleaner
      with `hg diff -w`.
      2cfb0bbf
    • Jordi Gutiérrez Hermoso's avatar
      demandimport: define a `deactivated` context manager · 2e780411
      Jordi Gutiérrez Hermoso authored
      This can be useful for use in "with" blocks for temporarily disabling
      demandimport.
      2e780411
    • Matt Harbison's avatar
    • Matt Harbison's avatar
      largefiles: use the convert extension for 'lfconvert --to-normal' · fcd2f9b0
      Matt Harbison authored
      The logic in the convert extension is more advanced, supporting extra features
      like converting revision IDs in 'extras' (e.g. 'amend_source'), supports
      updating hashes in commit messages, and outputs an SHA map file.  Rather than
      try to duplicate all of that, just use the existing code.
      
      Even though the convert extension supports user supplied options like filemap,
      etc, those features aren't available on the lfconvert interface.  Therefore, it
      is safe to use the filemap mechanism (in memory) to handle the standin -> file
      rename.  The convert extension handles the destination locking for this path.
      
      There was a comment in test-lfconvert.t about the hash on rev 5 being different
      because it was doing a better job than "hg remove" + "hg merge" + "hg commit".
      It isn't clear to me what was happening or why, but now the hashes match the
      original repo exactly after a roundtrip, which seems like a good idea.  If there
      really was something beneficial about the previous behavior, perhaps merge can
      be changed so that everyone benefits.
      
      Converting to a largefiles repo still uses the original (limited) lfconvert
      logic.
      fcd2f9b0
  17. May 27, 2015
Loading