This instance will be upgraded to Heptapod 0.21.0rc2 on 2021-04-16 at 14:00 UTC+2 (a few minutes of down time)

  1. 22 Oct, 2020 1 commit
  2. 17 Nov, 2020 1 commit
  3. 12 Nov, 2020 2 commits
  4. 22 Oct, 2020 1 commit
  5. 12 Oct, 2020 1 commit
  6. 22 Oct, 2020 1 commit
  7. 13 Nov, 2020 1 commit
    • Martin von Zweigbergk's avatar
      errors: catch urllib errors specifically instead of using safehasattr() · ae00e170f2d1
      Martin von Zweigbergk authored
      Before this patch, we would catch `IOError` and `OSError` and check if
      the instance had a `.code` member (indicates `HTTPError`) or a
      `.reason` member (indicates the more generic `URLError`). It seems to
      me that can simply catch those exception specifically instead, so
      that's what this code does. The existing code is from fbe8834923c5
      (commands: report http exceptions nicely, 2005-06-17), so I suspect
      it's just that there was no `urllib2` (where `URLError` lives) back
      then.
      
      The old code mentioned `SSLError` in a comment. The new code does
      *not* try to catch that. The documentation for `ssl.SSLError` says
      that it has a `.reason` property, but `python -c 'import ssl;
      print(dir(ssl.SSLError("foo", Exception("bar"))))` doesn't mention
      that property on either Python 2 or Python 3 on my system. It also
      seems that `sslutil` is pretty careful about converting `ssl.SSLError`
      to `error.Abort`. It also is carefult to not assume that instances of
      the exception have a `.reason`. So I at least don't want to catch
      `ssl.SSLError` and handle it the same way as `URLError` because that
      would likely result in a crash. I also wonder if we don't need to
      handle it at all (because `sslutil` might handle all the cases). It's
      now early in the release cycle, so perhaps we can just see how it
      goes?
      
      Differential Revision: https://phab.mercurial-scm.org/D9318
      ae00e170f2d1
  8. 22 Oct, 2020 1 commit
  9. 07 Oct, 2020 1 commit
  10. 22 Oct, 2020 1 commit
    • Martin von Zweigbergk's avatar
      errors: add config that lets user get more detailed exit codes · 21733e8c924f
      Martin von Zweigbergk authored
      This adds an experimental config that lets the user get more detailed
      exit codes. For example, there will be a specific error code for
      input/user errors. This is part of
      https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. I've made the
      config part of tweakdefaults.
      
      I've made the config enabled by default in tests. My reasoning is that
      we want to see that each specific error case gives the right exit code
      and we don't want to duplicate all error cases in the entire test
      suite. It also makes it easy to grep the `.t` files for `[255]` to
      find which cases we have left to fix. The logic for the current exit
      codes is quite simple, so I'm not too worried about regressions
      there. I've added a test case specifically for the "legacy" exit
      codes.
      
      I've set the detailed exit status only for the case of
      `InterventionRequired` and `SystemExit` for now (the cases where we
      currently return something other than 255), just to show that it
      works.
      
      Differential Revision: https://phab.mercurial-scm.org/D9238
      21733e8c924f
  11. 08 Nov, 2020 1 commit
    • Martin von Zweigbergk's avatar
      worker: raise exception instead of calling sys.exit() with child's code · 8f07f5a9c3de
      Martin von Zweigbergk authored
      When a worker process returns an error code, we would call
      `sys.exit()` with that exit code on the main process. The `SystemExit`
      exception would then get caught in `scmutil.callcatch()`, which would
      return that error code. The comment there says "Commands shouldn't
      sys.exit directly", which I agree with. This patch changes it so we
      raise a specific exception when a worker fails so we can catch
      instead. I think that means that `SystemExit` is now always an
      internal error.
      
      (I had earlier thought that this call to `sys.exit()` was from within
      the child process until Matt Harbison made me look again, so thanks
      for that!)
      
      Differential Revision: https://phab.mercurial-scm.org/D9287
      8f07f5a9c3de
  12. 04 Oct, 2020 1 commit
    • Yuya Nishihara's avatar
      scmutil: move walkchangerevs() from cmdutil · 508dfd1c18df
      Yuya Nishihara authored
      It's no longer a command-level function, but a pure helper to walk revisions
      in a windowed way. This change will help eliminate reverse dependency of
      revset.py -> grep.py -> cmdutil.py in future patches.
      508dfd1c18df
  13. 08 Oct, 2020 1 commit
  14. 01 Sep, 2020 1 commit
  15. 18 Sep, 2020 1 commit
  16. 16 Sep, 2020 1 commit
    • Kyle Lippincott's avatar
      branchmap: add a cache validation cache, avoid expensive re-hash on every use · 89f0d9f87701
      Kyle Lippincott authored
      In a pathological `hg log` case, we end up executing the branchmap validity
      checking twice per commit displayed. Or maybe we always do, and I just noticed
      because it's really slow in this repo for some reason.
      
      Before:
      ```
        Time (mean ± σ):      9.816 s ±  0.071 s    [User: 9.435 s, System: 0.392 s]
      
        Range (min … max):    9.709 s …  9.920 s
      ```
      
      After:
      ```
        Time (mean ± σ):      8.671 s ±  0.078 s    [User: 8.309 s, System: 0.392 s]
      
        Range (min … max):    8.594 s …  8.816 s
      ```
      
      Differential Revision: https://phab.mercurial-scm.org/D9023
      89f0d9f87701
  17. 14 Apr, 2020 1 commit
    • Pulkit Goyal's avatar
      share: introduce config option to store requires in .hg/store · d252f51ab032
      Pulkit Goyal authored
      This introduces a config option which enabled stores the requirements on a
      repository in store instead.
      
      When enabled, `.hg/requires` will contain the `share-safe` requirement which
      marks that the requirements are present in the store.
      This is done so that repository requirements can be shared with shares made
      using `hg share` command.
      
      After this patch, `hg share` checks whether the source repository has
      share-safe requirement, if yes, it does not copy the requirements.
      
      Test for the new functionality is added and a test case in exitsing share tests
      is also added.
      
      Differential Revision: https://phab.mercurial-scm.org/D8633
      d252f51ab032
  18. 07 Aug, 2020 1 commit
  19. 18 Dec, 2019 1 commit
  20. 17 Nov, 2019 1 commit
    • Pierre-Yves David's avatar
      localrepo: also fastpath access to working copy parents when possible · 85c4cd73996b
      Pierre-Yves David authored
      If the filter level guarantee that the working copy parents will be visible, we
      allow fast path access to them. With this change multiple commands can now run
      without triggering filtering.
      
      After using the quick access mechanism introduced, the whole series results in
      pretty good performance gain:
      
      ```
      All benchmarks:
      
             before           after         ratio
           [8e09551206f5]       [36b2f6597d6d]
      -       711±0.8ms       60.7±0.2ms     0.09  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -       712±0.8ms       61.6±0.2ms     0.09  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -         690±1ms       93.5±0.3ms     0.14  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -         688±1ms       93.8±0.3ms     0.14  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -         714±1ms       60.7±0.8ms     0.09  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -         713±1ms       60.9±0.3ms     0.09  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -         689±1ms       93.7±0.2ms     0.14  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -         687±2ms       92.8±0.2ms     0.14  simple_command.read.diff.empty.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -         799±2ms       98.1±0.6ms     0.12  simple_command.read.export.bare.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -       800±0.8ms      100.0±0.4ms     0.12  simple_command.read.export.bare.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -       711±0.9ms        111±0.2ms     0.16  simple_command.read.export.bare.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -         711±1ms        112±0.3ms     0.16  simple_command.read.export.bare.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -         760±1ms       59.8±0.1ms     0.08  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -         763±2ms       62.2±0.3ms     0.08  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -         689±1ms       93.1±0.3ms     0.14  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -         688±1ms       94.3±0.3ms     0.14  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 1) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -         763±1ms       60.1±0.2ms     0.08  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -         763±1ms       62.1±0.4ms     0.08  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py2.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      -       689±0.8ms       93.2±0.2ms     0.14  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYc-HGWITHRUSTEXTcpython]
      -       687±0.9ms       94.1±0.3ms     0.14  simple_command.read.status.wc_clean.default.time_bench('mercurial-filtered-2019-11-22', 'zstd', 'default', True, True, True, True, True, 2) [citrea/virtualenv-py3.7-pyyaml-HGMODULEPOLICYrust+c-HGWITHRUSTEXTcpython]
      ```
      
      Differential Revision: https://phab.mercurial-scm.org/D7492
      85c4cd73996b
  21. 14 Jan, 2020 1 commit
  22. 13 Jan, 2020 2 commits
  23. 27 Dec, 2019 1 commit
  24. 11 Dec, 2019 2 commits
  25. 01 Nov, 2019 1 commit
  26. 21 Nov, 2019 1 commit
  27. 19 Nov, 2019 1 commit
  28. 14 Nov, 2019 2 commits
  29. 14 Apr, 2020 1 commit
    • Pulkit Goyal's avatar
      scmutil: add writereporequirements() and route requires writing through it · a03c177a4679
      Pulkit Goyal authored
      In upcoming patches, to implement Share Safe plan we will be introducing
      requires file in store. We need to route all callers to a single function
      to check for a share-safe requirement and if present, write requirements to
      .hg/store/requires instead.
      
      After this patch, callers directly calling scmutil.writerequires() are only
      those where we don't have the repo object, for example when initializing
      the repository object itself.
      
      Differential Revision: https://phab.mercurial-scm.org/D8631
      a03c177a4679
  30. 10 Jul, 2020 1 commit
  31. 26 May, 2020 2 commits
  32. 11 May, 2020 1 commit
    • Martin von Zweigbergk's avatar
      revisions: parse "x123" as "nodeid starting with 123" without prefixhexnode · 62435a5b46fe
      Martin von Zweigbergk authored
      `experimental.revisions.prefixhexnode` makes it so the template
      function `shortest()` uses an "x" prefix to disambiguate between short
      nodeids and revnums. That config has so far also been used for
      enabling parsing of "x123" unambiguously as a nodeid. That makes it a
      little annoying for people who have prefixhexnode=yes to share such
      nodeids with people who have prefixhexnode=no ("x123" will be
      considered invalid for them). There seems to be little harm in
      allowing that parsing for everyone. We still let e.g. bookmark names
      like "x123" take precedence over the nodeid, so that's not a
      concern. The only thing I can think of is that people get used to the
      "x" prefix being valid, making it impossible for us to change to a
      different prefix if we wanted to do that when graduating the feature.
      
      Differential Revision: https://phab.mercurial-scm.org/D8514
      62435a5b46fe
  33. 08 Nov, 2019 1 commit
    • Augie Fackler's avatar
      cleanup: remove pointless r-prefixes on single-quoted strings · 9f70512ae2cf
      Augie Fackler authored
      This is the promised second step on single-quoted strings. These had
      existed because our source transformer didn't turn r'' into b'', so we
      had tagged some strings as r-strings to get "native" strings on both
      Pythons. Now that the transformer is gone, we can dispense with this
      nonsense.
      
      Methodology:
      
      I ran
      
          hg locate 'set:added() or modified() or clean()' | egrep '.*\.py$'  | xargs egrep --color=never -n  -- \[\^b\]\[\^a-z\]r\'\[\^\'\\\\\]\*\'\[\^\'\
      
      in an emacs grep-mode buffer, and then used a keyboard macro to
      iterate over the results and remove the r prefix as needed.
      
      # skip-blame removing unneeded r prefixes left over from Python 3 migration.
      
      Differential Revision: https://phab.mercurial-scm.org/D7306
      9f70512ae2cf
  34. 07 Oct, 2019 1 commit
  35. 08 Jul, 2019 1 commit