Skip to content
Snippets Groups Projects
  1. Oct 22, 2020
    • Gregory Szorc's avatar
      contrib: split Windows requirements into multiple files · d270b9b797a7
      Gregory Szorc authored
      Package support for Python 2 has diverged significantly. It is no
      longer trivial to maintain a single requirements file that supports
      both Python 2 and 3 because the set of packages and versions varies
      wildly.
      
      This commit split up the Windows requirements files so we have
      variants for Python 2 and 3. As part of this, I also renamed the
      files to have what I believe to be more reasonable naming ("win32"
      felt like a weird identifier to me).
      
      We can see that some package versions decreated on 2.7. This is
      because the old pinned versions weren't compatible with Python 2.
      d270b9b797a7
  2. Oct 19, 2020
  3. Oct 09, 2020
  4. Oct 08, 2020
  5. Oct 05, 2020
    • Gregory Szorc's avatar
      pyoxidizer: produce working Python 3 Windows installers (issue6366) · 57b5452a55d5
      Gregory Szorc authored
      While we've had code to produce Python 3 Windows installers with
      PyOxidizer, we haven't been advertising them on the web site due to
      a bug in making TLS connections and issues around resource handling.
      
      This commit upgrades our PyOxidizer install and configuration to
      use a recent Git commit of PyOxidizer. This new version of PyOxidizer
      contains a *ton* of changes, improvements, and bug fixes. Notably,
      Windows shared distributions now mostly "just work" and the TLS bug
      and random problems with Python extension modules in the standard
      library go away. And Python has been upgraded from 3.7 to 3.8.6.
      
      The price we pay for this upgrade is a ton of backwards incompatible
      changes to Starlark.
      
      I applied this commit (the overall series actually) on stable to
      produce Windows installers for Mercurial 5.5.2, which I published
      shortly before submitting this commit for review.
      
      In order to get the stable branch working, I decided to take a
      less aggressive approach to Python resource management. Previously,
      we were attempting to load all Python modules from memory and were
      performing some hacks to copy Mercurial's non-module resources
      into additional directories in Starlark. This commit implements
      a resource callback function in Starlark (a new feature since
      PyOxidizer 0.7) to dynamically assign standard library resources
      to in-memory loading and all other resources to filesystem loading.
      This means that Mercurial's files and all the other packages we ship
      in the Windows installers (e.g. certifi and pygments) are loaded
      from the filesystem instead of from memory. This avoids issues
      due to lack of __file__ and enables us to ship a working Python
      3 installer on Windows.
      
      The end state of the install layout after this patch is not
      ideal for @: we still copy resource files like templates and
      help text to directories next to the hg.exe executable. There
      is code in @ to use importlib.resources to load these files and
      we could likely remove these copies once this lands on @. But for
      now, the install layout mimics what we've shipped for seemingly
      forever and is backwards compatible. It allows us to achieve the
      milestone of working Python 3 Windows installers and gets us a
      giant step closer to deleting Python 2.
      
      Differential Revision: https://phab.mercurial-scm.org/D9148
      57b5452a55d5
  6. Oct 01, 2020
  7. Sep 28, 2020
  8. Sep 30, 2020
    • Raphaël Gomès's avatar
      rust: start plugging the dirstate tree behind a feature gate · 496537c9c1b4
      Raphaël Gomès authored
      The previous patch added the `dirstate-tree` feature gate to enable the two
      dirstate implementations to co-habit while the tree-based one gets better.
      
      This patch copies over the code that differs, be it because the algorithm
      changed or because the borrowing rules are different.
      
      Indeed, `DirstateTree` is not observationally equivalent to the std `HashMap` in
      the APIs we use: it does not have the `Entry` API (yet?) and its iterator
      returns owned values instead of references. This last point is because the
      implementation needs to be changed to a more clever and efficient solution.
      
      Differential Revision: https://phab.mercurial-scm.org/D9133
      496537c9c1b4
    • Raphaël Gomès's avatar
      rust: introduce `dirstate-tree` cargo feature · e604a3c03ab9
      Raphaël Gomès authored
      This feature gates (at compile-time) the use of the newly-added dirstate tree.
      
      The motivation for this is that the dirstate tree is currently *very* slow;
      replacing the current hashmap-based dirstate is not a viable solution in terms
      of performance... and why would you be using the Rust implementation if not
      for performance?
      
      The feature will also help reviewers better understand the differences that
      will slowly appear as the dirstate tree gets better.
      
      Differential Revision: https://phab.mercurial-scm.org/D9132
      e604a3c03ab9
    • Raphaël Gomès's avatar
      rust: fix formatting · 423f17f94f35
      Raphaël Gomès authored
      Maybe there is a small divergence in the nightly formatter? This didn't seem to
      trip the CI.
      
      Differential Revision: https://phab.mercurial-scm.org/D9131
      423f17f94f35
  9. Sep 23, 2020
  10. Sep 28, 2020
  11. Sep 25, 2020
    • Raphaël Gomès's avatar
      rust: add `dirstate_tree` module · b51167d70f5a
      Raphaël Gomès authored
      Mercurial needs to represent the filesystem hierarchy on which it operates, for
      example in the dirstate. Its current on-disk representation is an unsorted, flat
      structure that gets transformed in the current Rust code into a `HashMap`.
      This loses the hierarchical information of the dirstate, leading to some
      unfortunate performance and algorithmic compromises.
      
      This module adds an implementation of a radix tree that is specialized for
      representing the dirstate: its unit is the path component. I have made no
      efforts to optimize either its memory footprint or its insertion speed: they're
      pretty bad for now.
      
      Following will be a few patches that modify the dirstate.status logic to use
      that new hierarchical information, fixing issue 6335 in the same swing.
      
      Differential Revision: https://phab.mercurial-scm.org/D9085
      b51167d70f5a
  12. Jul 24, 2020
  13. Sep 24, 2020
  14. Sep 15, 2020
  15. Sep 11, 2020
  16. Sep 15, 2020
  17. Sep 09, 2020
    • Antoine Cezar's avatar
      rhg: add `--revision` argument to `rhg files` · 2f8227a12592
      Antoine Cezar authored
      Add the option to list the tracked files of a revision given its number
      or full node id.
      
      Benched on a clone of moz-central
      where tip is 1671467:81deaa1a68ebb28db0490954034ab38ab269409d
      
      files -r 81deaa1a68ebb28db0490954034ab38ab269409d > out.txt
      hg  0m1.633s
      rhg 0m0.157s
      
      files -r 81deaa1a68ebb28db0490954034ab38ab269409d > /dev/null
      hg  0m0.415s
      rhg 0m0.143s
      
      Differential Revision: https://phab.mercurial-scm.org/D9015
      2f8227a12592
  18. Sep 18, 2020
Loading