Skip to content
Snippets Groups Projects
  1. Aug 02, 2023
  2. Oct 30, 2023
  3. Nov 02, 2023
    • Raphaël Gomès's avatar
      rust-index: implementation of __getitem__ · 002b4990
      Raphaël Gomès authored
      Although the removed panic tends to prove if the full test suite
      did pass that the case when the input is a node id does not happen,
      it is best not to remove it right now.
      
      Raising IndexError is crucial for iteration on the index to stop,
      given the default CPython sequence iterator, see for instance
      https://github.com/zpoint/CPython-Internals/blobs/master/BasicObject/iter/iter.md
      This was spotted by `test-rust-ancestors.py`, which does simple interations on
      indexes (as preflight checks).
      
      In `revlog.c`, `index_getitem` defaults to `index_get` when called
      on revision numbers, which does raise `IndexError` with the same message as
      the one we are introducing here.
      002b4990
  4. Sep 27, 2023
  5. Nov 02, 2023
  6. Sep 30, 2023
    • Georges Racinet's avatar
      rust-index: return variables systematic naming convention · 16d477bb
      Georges Racinet authored
      To help knowing at a glance when a method is ready, making
      us more comofortable when we are close to the final removal of
      scaffolding, we introduce the systematic variable names `rust_res` and
      `c_res`. The goal of this series is to always return the formet.
      
      We take again the case of `pack_header` as example.
      
      Our personal opinion is to usually avoid such poor semantics as `res`, but
      usually accept it when it close to the actual return, which will be the
      case in most methods of this series. Also, the name can simply be dropped
      when we remove the scaffolding. To follow on the example, the body of
      `pack_header()` should become this in the final version:
      
      ```
          let index = self.index(py).borrow();
          let packed = index.pack_header(args.get_item(py, 0).extract(py)?);
          Ok(PyBytes::new(py, &packed).into_object());
      ```
      
      in these cases it is close to the actual return and will be removed
      at the end entirely.
      16d477bb
  7. Sep 29, 2023
  8. Sep 27, 2023
  9. Oct 18, 2023
  10. Aug 03, 2023
  11. Oct 30, 2023
  12. Jun 29, 2023
  13. Jun 28, 2023
  14. Jun 27, 2023
    • Raphaël Gomès's avatar
      rust-index: synchronize append method · 65c9032e
      Raphaël Gomès authored
      We now append to the Rust index just as we do to the C index. Future steps
      will bring the two indexes further together until we can rip the C index
      entirely when running Rust code.
      65c9032e
  15. Sep 18, 2023
  16. Jun 27, 2023
    • Raphaël Gomès's avatar
      rust-index: pass data down to the Rust index · 6ec8387e
      Raphaël Gomès authored
      This will allow us to start keeping the Rust index synchronized with the
      cindex as we gradually implement more and more methods in Rust. This will
      eventually be removed.
      6ec8387e
    • Raphaël Gomès's avatar
      rust-index: add append method · b4d152a2
      Raphaël Gomès authored
      This is the first time the Rust index has any notion of mutability.
      This will be used in a future patch from Python, to start synchronizing the
      Rust index and the C index.
      b4d152a2
  17. Jun 26, 2023
  18. Jun 29, 2023
  19. Sep 27, 2023
  20. Dec 15, 2023
  21. Dec 07, 2023
  22. Dec 11, 2023
    • Pierre-Yves David's avatar
      changelog: never inline changelog · dcaa2df1
      Pierre-Yves David authored
      The test suite mostly use small repositories, that implies that most changelog in the
      tests are inlined. As a result, non-inlined changelog are quite poorly tested.
      Since non-inline changelog are most common case for serious repositories, this
      lack of testing is a significant problem that results in high profile issue like
      the one recently fixed by 66417f55ea33 and 849745d7da89.
      
      Inlining the changelog does not bring much to the table, the number of total
      file saved is negligible, and the changelog will be read by most operation
      anyway.
      
      So this changeset is make it so we never inline the changelog, and de-inline the
      one that are still inlined whenever we touch them.
      
      By doing that, we remove the "dual code path" situation for writing new entry to
      the changelog and move to a "single code path" situation. Having a single
      code path simplify the code and make sure it is covered by test (if test cover
      that situation obviously)
      
      
      This impact all tests that care about the number of file and the exchange size,
      but there is nothing too complicated in them just a lot of churn.
      
      The churn is made "worse" by the fact rust will use the persistent nodemap on
      any changelog now. Which is overall a win as it means testing the persistent
      nodemap more and having less special cases.
      
      In short, having inline changelog is mostly useless and an endless source of
      pain. We get rid of it.
      dcaa2df1
    • Pierre-Yves David's avatar
      test-transaction-safety: glog out irrelevant flag · 2e0b2a38
      Pierre-Yves David authored
      The test is focussing on the inline flag, so we glob out the other to highlight
      that fact and prevent noise in the future.
      2e0b2a38
    • Pierre-Yves David's avatar
      test-transaction-safety: perform the test on a filelog · cf23a843
      Pierre-Yves David authored
      This test previously checked the transaction safety of splitting the changelog.
      The changelog is a special case, with delayed/diverted writes and we will stop
      inlining it soon. So we keep testing that transaction is safe around inline on
      another revlog type : a filelog.
      
      Minor comestic adjustement will be done in the next changesets.
      cf23a843
  23. Dec 07, 2023
  24. Dec 12, 2023
  25. Dec 07, 2023
  26. Dec 12, 2023
  27. Dec 07, 2023
Loading