Skip to content
Snippets Groups Projects
  1. Nov 28, 2020
    • Pierre-Yves David's avatar
      rust: fix non-utf8 char in requirements.rs · 40f79997e81f
      Pierre-Yves David authored
      Apparently Phabricator detect `rust/hg-core/src/requirements.rs` file as non
      utf8 ‽, and mark it as binary.  During application it ended up being non-utf8
      and this made Rust (and as a result heptapod) very angry::
      
          error: couldn't read hg-core/src/requirements.rs: stream did not contain valid UTF-8
            --> hg-core/src/lib.rs:11:9
             |
          11 | pub mod requirements;
             |         ^^^^^^^^^^^^
      
          error: aborting due to previous error
      
          error: could not compile `hg-core`.
      
      The after "fixing", the file content has no character matching the following
      regexp:
      
        [^0-9-a-zA-Z /(|).,{}!\[\]:"&=>?_*-;<`'#]
      
      So we should be fine, unless Phabricator does something funny again.
      
      Differential Revision: https://phab.mercurial-scm.org/D9444
      40f79997e81f
  2. Nov 29, 2020
  3. Nov 27, 2020
  4. Nov 26, 2020
  5. Nov 27, 2020
  6. Nov 28, 2020
  7. Oct 01, 2020
    • Pierre-Yves David's avatar
      copies: introduce the hg-cpython wrapper for `combine_changeset_copies` · 50c5ee3bdf9a
      Pierre-Yves David authored
      This patch focus on the `hg-cpython` part of this work. Bridging the python code
      with the new rust code in `hg-core`. The next patch will actually plug this in
      the python code.
      
      The rust code use multiple Python callback, python related error within this
      callback are not expected unless they are a programming error or a data
      corruption. In addition, these callback will slowly be replaced by native Rust
      code. For these reasons, we use will deal with unexpected error within this
      callback using rust Panic and let the `rust-cpython` layer deal with raising a
      Python exception.
      
      The code dealing with the ChangedFile instance is repeating itself a lot. I did
      not factor these duplication out because that whole code will get replaced by
      entirely different one in a handful of changesets.
      
      Differential Revision: https://phab.mercurial-scm.org/D9298
      50c5ee3bdf9a
    • Pierre-Yves David's avatar
      copies: introduce a basic Rust function for `combine_changeset_copies` · 595979dc924e
      Pierre-Yves David authored
      This new function mirror the python code.  This first implementation does a lot
      of data copies and is therefore quite slow. However my goal here is to create a
      simple "frame" from where to start adding optimization.
      
      This patch focus on the `hg-core` part of this work. Coming patches will do the
      necessary `hg-cpython` work  to be able to use this from Python.
      
      Differential Revision: https://phab.mercurial-scm.org/D9297
      595979dc924e
  8. Nov 27, 2020
  9. Nov 25, 2020
  10. Nov 24, 2020
  11. Oct 06, 2020
  12. Nov 11, 2020
    • Mathias De Mare's avatar
      packaging: enable rust extensions on centos · eccbfa7e19c0
      Mathias De Mare authored
      Test on CentOS 7, repository with ~170000 tracked files,
          no untracked files:
      10 runs with this enabled:
       -- Run #0 time: 0.6519973278045654
       -- Run #1 time: 0.6933724880218506
       -- Run #2 time: 0.7512078285217285
       -- Run #3 time: 0.7517638206481934
       -- Run #4 time: 0.5966529846191406
       -- Run #5 time: 0.5960886478424072
       -- Run #6 time: 0.5940573215484619
       -- Run #7 time: 0.5963726043701172
       -- Run #8 time: 0.6048009395599365
       -- Run #9 time: 0.603604793548584
      
      10 runs without this enabled:
       -- Run #0 time: 2.127584457397461
       -- Run #1 time: 2.066192865371704
       -- Run #2 time: 2.0831892490386963
       -- Run #3 time: 2.077716588973999
       -- Run #4 time: 2.07608962059021
       -- Run #5 time: 2.072899341583252
       -- Run #6 time: 2.094369888305664
       -- Run #7 time: 2.067504644393921
       -- Run #8 time: 2.069610834121704
       -- Run #9 time: 2.0567898750305176
      
      Differential Revision: https://phab.mercurial-scm.org/D9294
      eccbfa7e19c0
  13. Nov 22, 2020
  14. Nov 21, 2020
    • Matt Harbison's avatar
      setup: copy pythonXY.dll next to the hg.exe wrapper when building · 2960b7fac966
      Matt Harbison authored
      This avoids the problem of having the newly built binary complaining that it
      can't find the DLL.  There is an option in the python.org installer to add the
      python install to PATH (which defaulted to "on" with py2, and therefore was not
      an issue up to this point), but that makes switching between python versions
      harder.
      
      This shouldn't be an issue with the PyOxidizer binary, but that current has
      issues running some of the tests, and took noticeably longer to build last time
      I tried it.
      
      Differential Revision: https://phab.mercurial-scm.org/D9362
      2960b7fac966
  15. Nov 22, 2020
  16. Nov 23, 2020
    • Matt Harbison's avatar
      ui: ensure `getpass()` returns bytes · 87e7dd8e7734
      Matt Harbison authored
      Previously, this could return either bytes or str.  I'm not sure which direction
      we should go in, but since the input is bytes, I guess bytes makes sense as
      output.  `debuguigetpass` crashed because it assumed bytes would be returned,
      `sslcontext.load_cert_chain()` is happy with bytes or str if the type info in
      PyCharm is correct, and `smtplib.SMTP.login()` wants str.
      
      I couldn't figure out how to test this, because the test stalls for input with
      `echo test | hg debuguigetpass --config ui.interactive=1`, likely because it
      drains stdin before prompting.  The custom input reading with `ui.nontty=1` does
      not.
      
      I'm also a bit concerned with all of this encoding/decoding.  The existing code
      in the mail module uses `encoding.strfromlocal()`, but the username and password
      are ascii encoded/decoded in `mercurial.url.passwordmgr.find_user_password()`
      with `pycompat.{str,bytes}url()`.  I'm not sure if this inconsistency could
      cause subtle compatability issues.
      
      Differential Revision: https://phab.mercurial-scm.org/D9375
      87e7dd8e7734
  17. Nov 26, 2020
  18. Nov 24, 2020
  19. Nov 25, 2020
  20. Nov 21, 2020
  21. Nov 20, 2020
  22. Oct 16, 2020
  23. Nov 23, 2020
  24. Nov 24, 2020
Loading