Skip to content
Snippets Groups Projects
  1. May 04, 2022
  2. May 03, 2022
  3. May 04, 2022
  4. Apr 28, 2022
  5. May 03, 2022
  6. Apr 25, 2022
  7. Apr 19, 2022
    • Raphaël Gomès's avatar
      rhg: use `Command::exec` instead of `Command::status` · 006688e36e12
      Raphaël Gomès authored
      `rhg` is supposed to be a transparent executable, using a subprocess defeats
      that purpose. See inline comments for more details.
      
      This also introduces the `which` crate to check if the fallback executable
      actually exists to help debugging (plain `execve` doesn't give much
      information).
      
      The error code 253 is used to signify that the fallback is not found, but may
      mean in the future that it is otherwise invalid if we start being more
      specific.
      
      Differential Revision: https://phab.mercurial-scm.org/D12578
      006688e36e12
  8. Apr 27, 2022
  9. Apr 21, 2022
  10. Apr 13, 2022
  11. Apr 19, 2022
  12. Apr 13, 2022
  13. Apr 07, 2022
  14. Apr 06, 2022
  15. Apr 05, 2022
    • Raphaël Gomès's avatar
      Added signature for changeset 5bd6bcd31dd1 · dd98bd0b6501
      Raphaël Gomès authored
      dd98bd0b6501
    • Raphaël Gomès's avatar
      Added tag 6.1.1 for changeset 5bd6bcd31dd1 · d3709fa59190
      Raphaël Gomès authored
      d3709fa59190
    • Raphaël Gomès's avatar
      relnotes: add notes for 6.1.1 · 5bd6bcd31dd1
      Raphaël Gomès authored
      This also fixes the header for 6.1 from 6.1rc0
      6.1.1
      5bd6bcd31dd1
    • Raphaël Gomès's avatar
      rust-hgpath: add `repr(transparent)` to `HgPath` · 9dcfd1d05e6e
      Raphaël Gomès authored
      It's been stabilized a long time ago, so let's not rely on an implementation
      detail now.
      
      Differential Revision: https://phab.mercurial-scm.org/D12433
      9dcfd1d05e6e
    • Raphaël Gomès's avatar
      rust-dirstatemap: correctly decrement the copies counter · ce919b1a1063
      Raphaël Gomès authored
      This was caught when writing unit tests for the `DirstateMap`. We were always
      setting `had_copy_source` to `false` since we erased the value just before.
      
      Differential Revision: https://phab.mercurial-scm.org/D12432
      ce919b1a1063
    • Raphaël Gomès's avatar
      rust-dirstatemap: properly decrement counter for tracked descendants · fbc02ccc207e
      Raphaël Gomès authored
      I found this bug when writing unit tests after the fact for the `DirstateMap`.
      We never decremented the tracked descendants counter since we were always
      resetting the node data before reading it. This also drops the use of `state`,
      in favor of the new API to get that information.
      
      Differential Revision: https://phab.mercurial-scm.org/D12431
      fbc02ccc207e
    • Raphaël Gomès's avatar
      rust-dirstate: panic if the DirstateMap counters go below 0 · 2593873cda0f
      Raphaël Gomès authored
      When modifying the API I hit some... interesting errors (trying to allocate
      178GB of RAM, for example) because I failed to keep the counters correctly
      updated.
      
      This counter underflow is likely to happen when code is changed around
      and can have up to eat-your-dirstate level of consequences, which is not nice.
      
      The very small runtime cost of checking these counters should really not be an
      issue and will help us uncover bugs when/if they do appear in the future.
      
      Differential Revision: https://phab.mercurial-scm.org/D12430
      2593873cda0f
    • Raphaël Gomès's avatar
      rust: fix unsound `OwningDirstateMap` · dd6b67d5c256
      Raphaël Gomès authored
      As per the previous patch, `OwningDirstateMap` is unsound. Self-referential
      structs are difficult to implement correctly in Rust since the compiler is
      free to move structs around as much as it wants to. They are also very rarely
      needed in practice, so the state-of-the-art on how they should be done within
      the Rust rules is still a bit new.
      
      The crate `ouroboros` is an attempt at providing a safe way (in the Rust sense)
      of declaring self-referential structs. It is getting a lot attention and was
      improved very quickly when soundness issues were found in the past: rather than
      relying on our own (limited) review circle, we might as well use the de-facto
      common crate to fix this problem. This will give us a much better chance of
      finding issues should any new ones be discovered as well as the benefit of
      fewer `unsafe` APIs of our own.
      
      I was starting to think about how I would present a safe API to the old struct
      but soon realized that the callback-based approach was already done in
      `ouroboros`, along with a lot more care towards refusing incorrect structs.
      
      In short: we don't return a mutable reference to the `DirstateMap` anymore, we
      expect users of its API to pass a `FnOnce` that takes the map as an argument.
      This allows our `OwningDirstateMap` to control the input and output lifetimes
      of the code that modifies it to prevent such issues.
      
      Changing to `ouroboros` meant changing every API with it, but it is relatively
      low churn in the end. It correctly identified the example buggy modification of
      `copy_map_insert` outlined in the previous patch as violating the borrow rules.
      
      Differential Revision: https://phab.mercurial-scm.org/D12429
      dd6b67d5c256
    • Raphaël Gomès's avatar
      rust: explain why the current `OwningDirstateMap` is unsound · cfd270d83169
      Raphaël Gomès authored
      See inline comments.
      
      Differential Revision: https://phab.mercurial-scm.org/D12428
      cfd270d83169
  16. Apr 01, 2022
  17. Jul 23, 2021
  18. Mar 24, 2022
Loading