Skip to content
Snippets Groups Projects
  1. May 27, 2015
    • Pierre-Yves David's avatar
      test: use bundle2 in test-ssh · 2c14ab597353
      Pierre-Yves David authored
      Now that we have a bundle1 version of this test, we can move the main
      version to bundle2. This lets us handle the ouput change from using
      the bundle2 protocol earlier.
      2c14ab597353
    • Pierre-Yves David's avatar
      test: copy test-ssh.t to test-ssh-bundle1.t · b08887e723a9
      Pierre-Yves David authored
      We want to keep both code paths tested. The test is a bit too extensive to
      simply introduce dual testing in it so we make a copy for each protocol
      version.
      b08887e723a9
    • Pierre-Yves David's avatar
      test: lock test-unbundlehash to bundle1 usage · c2d691542d6a
      Pierre-Yves David authored
      It is testing a bundle1 specific behavior. Bundle2 has its own way there. See
      inline comment for details.
      c2d691542d6a
    • Pierre-Yves David's avatar
      test: use bundle2 in test-acl · 9793e52279a1
      Pierre-Yves David authored
      This test makes extensive use of --debug so moving to bundle2 based exchange
      has a massive impact. We do it early to reduce the noise create by a future
      usage of bundle2 as the default protocol.
      9793e52279a1
    • Pierre-Yves David's avatar
      test: use both bundle formats in test-pull-http · df723a2655e9
      Pierre-Yves David authored
      It is valuable to have both formats tested.
      df723a2655e9
    • Pierre-Yves David's avatar
      test: use bundle2 in test-http-proxy · fbcbdc62f248
      Pierre-Yves David authored
      The proxy test does not care about what protocol is used, but the new
      protocol implies different traffic (and therefore different log
      output).  We switch it to bundle2 early to minimise the noise of using
      bundle2 for exchange by default.
      fbcbdc62f248
    • Pierre-Yves David's avatar
      tests: use bundle2 for test-hook · faed8e52b81f
      Pierre-Yves David authored
      Using bundle2 has an effect on which hooks are run when. We turn it on for
      test-hooks early to reduce the noise of switching the default exchange to
      bundle2.
      faed8e52b81f
    • Pierre-Yves David's avatar
      pull: only prefetch bookmarks when using bundle1 · 02defdb1b628
      Pierre-Yves David authored
      All bundle2 servers now support the 'listkeys' part(1), so we'll
      always be able to fetch bookmarks data at the same time as the
      changeset. This should be enough to avoid the one race condition that
      this bookmark prefetching is trying to work around. It even allows
      future server to make sure everything is generated from the same
      "transaction" if they become capable of such. The current code was
      already overwriting the prefetched value with the one in bundle2
      anyway.  Note that this is not preventing all race conditions in
      related to bookmark in 'hg pull' it makes nothing better and nothing
      worse.
      
      Reducing the number of listkeys calls will reduce the latency on pull.
      
      The pre-fetch is also moved into a discovery step because it seems to belong
      there.
      
      (1) Because all servers not speaking 'pushkey' parts are compatible with the
      'HG2X' protocol only.
      02defdb1b628
  2. May 28, 2015
  3. May 30, 2015
    • Yuya Nishihara's avatar
      hg: explicitly check that peer lookup object has instance() if call failed · 4cc3fb23881d
      Yuya Nishihara authored
      If a "thing" is callable but raises TypeError for some reason, a callable
      object would be returned. Thereafter, unfriendly traceback would be displayed:
      
        Traceback (most recent call last):
          ...
          File "mercurial/hg.pyc", line 119, in _peerorrepo
            obj = _peerlookup(path).instance(ui, path, create)
        AttributeError: 'function' object has no attribute 'instance'
      
      Instead, we should show the reason why "thing(path)" didn't work:
      
        Traceback (most recent call last):
          ...
          File "hggit/__init__.py", line 89, in _local
            p = urlcls(path).localpath()
        TypeError: 'NoneType' object is not callable
      
      If a "thing" is not callable, it must be a module or an object that implements
      instance(). If that module didn't have instance(), the error message would be
      "<unloaded module 'foo'> object is not callable". It doesn't make perfect sense,
      but it isn't so bad as it can blame which module went wrong.
      4cc3fb23881d
  4. Mar 30, 2015
  5. May 31, 2015
  6. May 27, 2015
    • Martin von Zweigbergk's avatar
      treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?' · 20ad936ac5d2
      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.
      20ad936ac5d2
  7. May 29, 2015
  8. May 27, 2015
    • Laurent Charignon's avatar
      record: add default value for operation argument · 724421cb4745
      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.
      724421cb4745
  9. May 28, 2015
    • Laurent Charignon's avatar
      record: precise documentation · 31f3636e9296
      Laurent Charignon authored
      This patch improves the documentation of the recordfilter function to explain
      that we need a translated string for the 'operation' argument.
      31f3636e9296
  10. May 27, 2015
  11. May 29, 2015
    • Laurent Charignon's avatar
      revert: remove unused debug code in the test file · 48b1d8944406
      Laurent Charignon authored
      I left a test environment variable in a previous commit and it is doing nothing
      useful. This patch removes it.
      48b1d8944406
    • Ryan McElroy's avatar
      commands: rename current to active in variables and comments · 62da2d7745f9
      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.
      62da2d7745f9
    • Ryan McElroy's avatar
      templatekw: introduce active subkeyword from bookmarks keyword · f26efa4f0eff
      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.
      f26efa4f0eff
  12. Apr 16, 2015
    • Ryan McElroy's avatar
      bookmarks: name label for active bookmark correctly · ceec79b5657a
      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.
      ceec79b5657a
  13. May 29, 2015
  14. May 17, 2015
    • Yuya Nishihara's avatar
      revset: add fast path for _list() of integer revisions · ceaf04bb14ff
      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)
      ceaf04bb14ff
    • Yuya Nishihara's avatar
      revset: optimize 'or' operation of trivial revisions to a list · 7fbef7932af9
      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)
      7fbef7932af9
  15. May 29, 2015
  16. May 24, 2015
    • Yuya Nishihara's avatar
      revset: make internal _list() expression remove duplicated revisions · 9d6cc87bd507
      Yuya Nishihara authored
      This allows us to optimize chained 'or' operations to _list() expression.
      
      Unlike _intlist() or _hexlist(), it's difficult to remove duplicates by the
      caller of _list() because different symbols can point to the same revision.
      If the caller knows all symbols are unique, that probably means revisions or
      nodes are known, therefore, _intlist() or _hexlist() should be used instead.
      So, it makes sense to check duplicates by _list() function.
      
      '%ls' is no longer used in core, this won't cause performance regression.
      9d6cc87bd507
    • Yuya Nishihara's avatar
      repair: use _hexlist() to build revset expression from binary nodes · 28800ab40395
      Yuya Nishihara authored
      _hexlist() should be efficient than _list().
      28800ab40395
  17. May 29, 2015
  18. May 27, 2015
    • Pierre-Yves David's avatar
      subrepo: detect issue3781 case earlier so it apply to bundle2 · 636b1f1b9f8d
      Pierre-Yves David authored
      We are doing some strange special casing of phase push when:
      
      - the source is a subrepo
      - the destination is publishing
      - some changeset are still draft on the destination
      
      In that case we do not push phases information (to publish the draft changesets)
      because it could break simple cycle of 'clone/pull/push' of subrepos. We have to
      detect this case earlier to have bundle2 respecting it.
      
      We change the test to check the behavior for both bundle1 and bundle2.
      636b1f1b9f8d
    • Pierre-Yves David's avatar
      bundle2: hide bundle2 stream debug under a config flag · 7c60a42265fb
      Pierre-Yves David authored
      The old output is very verbose and unsuitable for general debug level. It is
      however very useful for debugging bundle2 generation or consumption issues. All
      this verbose ouput is hidden under a 'devel.bundle2.debug' flag.
      7c60a42265fb
Loading