Skip to content
Snippets Groups Projects
  1. May 01, 2024
  2. Apr 22, 2024
    • Georges Racinet's avatar
      RHGitaly LastCommitForPath · beb23d791fdb
      Georges Racinet authored
      This is about as straightforward as the Python implementation,
      given the prerequisites (`PathSpec` and of course Mercurial 6.7).
      
      A few things could be made
      more comfortable with error treatment, but that is candy at this point.
      
      Closes #185
      beb23d791fdb
    • Georges Racinet's avatar
      rhgitaly::git::PathSpec, with literal and wildcard implementations · 7fa2d2d05635
      Georges Racinet authored
      This will be useful in `LastCommitForPath` or anything where Git path
      specifications are expected.
      
      This is probably very clumsy, due to the painful reimplementation of
      `fnmatch` but at this point, it passes the Comparison Tests.
      Included unit tests are available for potential later refactorings.
      
      In particular, this was done to match the Python implementation, in
      which it was assumed that using `fnmatch` as much as possible was the
      way to go, because of the potential it has to have a native implementation,
      hence being infinitely fast compared to looping in Python. This is the
      justification for the full splitting at forward slashes, which is
      probably unnecessary in Rust.
      7fa2d2d05635
  3. Apr 15, 2024
    • Georges Racinet's avatar
      rhgitaly::mercurial::ChangelogRef to implement Graph · e115efcfd14f
      Georges Racinet authored
      While waiting for a decision that `hg-core`'s `&Changelog` would
      implement `Graph` (or perhaps a general implementation of `Graph` for any
      reference to a `Graph`), we provide the same functionality by means of
      the "newtype" pattern.
      
      The need comes from the fact that `AncestorsIterator` and many
      Graph-related algorithms take ownership of the `Graph` they work with.
      This, in turn is due to them needing to accept the `Index` instances
      that are provided by the Python layers (that neither `rhg` nor `RHGitaly`
      use, of course): the fact that nowadays the Python layer holds an object
      that is itself implemented in Rust does not change the core problem that
      they cannot be tracked by the borrow checker.
      
      Also, it looks like cloning `Changelog` would be cheap. Still, it seems
      hard to guarantee that on the long run. The object is already too rich
      for us to be comfortable with it, when using references is the most
      natural and guaranteed way of proceeding.
      e115efcfd14f
  4. Apr 14, 2024
  5. Apr 19, 2024
  6. Apr 18, 2024
  7. Apr 03, 2024
  8. Apr 02, 2024
  9. Mar 25, 2024
  10. Mar 20, 2024
  11. Mar 17, 2024
    • Georges Racinet's avatar
      New cycle · f58c26d8aff2
      Georges Racinet authored
      Hoping it will be right this time.
      f58c26d8aff2
    • Georges Racinet's avatar
      Added tag 1.3.2 for changeset 220add4ef090 · 45dce2a21a2d
      Georges Racinet authored
      45dce2a21a2d
    • Georges Racinet's avatar
      Setting version for release · 220add4ef090
      Georges Racinet authored
      The `VERSION` file change did not make it to 1.3.1, hence redoing
      with a new number.
      1.3.2
      220add4ef090
    • Georges Racinet's avatar
      New dev cycle · 8034f590ce4e
      Georges Racinet authored
      8034f590ce4e
    • Georges Racinet's avatar
      Added tag 1.3.1 for changeset 35a5ffade951 · a14e4927fa12
      Georges Racinet authored
      a14e4927fa12
    • Georges Racinet's avatar
      CI/CD: uploading a precompiled binary · 35a5ffade951
      Georges Racinet authored
      This will be useful in CI for Heptapod Rails, avoiding a
      lenghty compilation job when unnecessary.
      
      Some users may find it useful as well.
      1.3.1
      35a5ffade951
    • Georges Racinet's avatar
      RHGitaly tarball: do not put under the rust/ workspace · 0e3bb66f6f59
      Georges Racinet authored
      On subsequent compilation in CI, this will help making sure
      that the result is really compiled from the tarball, and hence
      that the latter is fully self-contained.
      0e3bb66f6f59
    • Georges Racinet's avatar
      CI/CD: display Rust version in rust job · a004781843c1
      Georges Racinet authored
      Never hurts.
      a004781843c1
    • Georges Racinet's avatar
      RefService.ListRefs: implement sort options · 5e471db01039
      Georges Racinet authored
      The Python implementation is straightforward. Of course, we have
      to conflate the three possible dates, and even use those of the
      target changeset, as we don't have creation dates for references
      (we could in the case of tags in some far future).
      
      In the Rust implementation, the key point is how to start with an ordinary
      async `spawn` and then use a separate thread (`spawn_blocking`) to
      open the changelog if needed.
      
      It turns out that doing this from the first spawned task is impossible
      (it claims that `spawn_blocking` or its avatar as `load_repo_and_then` is
      not `Send` as soon as we want to pass the vector to sort).
      So instead, we pipe a second channel if needed. It sounds a bit silly
      to chunk, reaggregate, and then rechunk after sorting, but it does not
      matter much in the grand scheme of things.
      
      Also attempts to move this new spawning to `rhgitaly::repository` were
      unconclusive: in the current state of things, it would force to preclone
      the entire request, which is probably not a big concern, but still
      unsatisfactory, given that we only need the sort options (in this case,
      but not in a generic version). This is all complicated by the error about
      not being `Send` that gets displayed systematically if there are other
      errors (does not help knowing whether it will be true at the end when
      experimenting). We'll leaving it as is for now, and wait to have more
      use cases to try and do better.
      5e471db01039
    • Georges Racinet's avatar
      rhgitaly::message: made timestamp parsing public · 9fb6bceca334
      Georges Racinet authored
      It can be used for more than just putting in a `GitCommit` message.
      9fb6bceca334
  12. Mar 14, 2024
  13. Mar 12, 2024
  14. Mar 11, 2024
Loading