Skip to content
Snippets Groups Projects
  1. Oct 15, 2020
    • Georges Racinet's avatar
      requirements: bumped minimal version of py-heptapod · 7210aded
      Georges Racinet authored
      HGitaly now uses some helpers that are not present in the latest
      released version of py-heptapod (known as `heptapod` as a
      Python project), hence we have to base our requirement on a
      pre-release distribution (which was just uploaded).
      7210aded
  2. Oct 13, 2020
    • Georges Racinet's avatar
      GetArchive: honouring the path parameter · fd5edb7b
      Georges Racinet authored
      In the GitLab application, this is used for download
      links in "subtrees" of the repository.
      
      An archival metadata file is not expected (nor is it on
      the Git side).
      
      I've checked that `git archive` behaves similarly, i.e., just
      an inclusion rule, with no re-anchoring of the files at the top
      of the archive.
      fd5edb7b
    • Georges Racinet's avatar
      path: validation utilities · 3be51d8b
      Georges Racinet authored
      We'll need to perform the same kind of validation on paths
      that Gitaly does, and Mercurial itself already provides us
      with utilities to re-expose.
      3be51d8b
  3. Oct 12, 2020
  4. Oct 13, 2020
  5. Oct 14, 2020
  6. Oct 10, 2020
    • Georges Racinet's avatar
      server: Unix Domain socket support · d79a7c23
      Georges Racinet authored
      This will in particular be a boon for HDK users, once it
      becomes the default in RSpec integration tests.
      
      On servers, it'll provide better insulation and reduce latency
      a little bit.
      
      Closes #4
      d79a7c23
    • Georges Racinet's avatar
      coverage: fully testing hgext3rd.hgitaly · 580677ba
      Georges Racinet authored
      There were previously no tests at all, and it wasn't in
      coverage report.
      
      Testing in Mercurial extension context is a bit more painful,
      but it's become easier now that the extension is just a thin
      wrapper.
      580677ba
    • Georges Racinet's avatar
      server: moved init/start logic outside of Mercurial extension · e5d2c2bd
      Georges Racinet authored
      This provides a more natural and easier to test setting, with
      the extension being now only a thin wrapper for command-line
      arguments, configuration and startup exceptions.
      
      This also makes inner code more natural by stopping to insist that
      any string must be bytes: URLs are now str in `hgitaly.server`.
      On the other hand, storage root paths will keep on being bytes, as
      is natural for file system paths.
      e5d2c2bd
    • Georges Racinet's avatar
      grpcio: requiring at least 1.32 for exception uniformity · 3865ccd5
      Georges Racinet authored
      In cases of socket bind failures, grpcio 1.31.0 returns a zero
      port value, whereas 1.32.0 raises RuntimeError.
      
      To avoid making special cases that seem useless, let's just make
      explicit that we are using at least 1.32.
      3865ccd5
    • Georges Racinet's avatar
      Python 2: dropping support · edda7778
      Georges Racinet authored
      See heptapod#353 for rationale. Actually, this is more along
      the lines of not bothering about *potential* Python 2 support,
      as HGitaly wasn't really working under Python 2 anyway, notably
      because of type annotations (granted, we could have dropped them,
      but it doesn't matter any more).
      edda7778
  7. Oct 09, 2020
  8. Sep 28, 2020
  9. Sep 14, 2020
  10. Jul 30, 2020
  11. Jul 29, 2020
    • Georges Racinet's avatar
      Server command: made --repositories-root work · 3d8700a4
      Georges Racinet authored
      Apparently, `None` as default argument for an option is
      incompatible with it having a value. The only way to detect
      a missing string argument is to evaluate to bool. In this case,
      it's not a problem.
      3d8700a4
  12. Jun 27, 2020
  13. Jun 28, 2020
    • Georges Racinet's avatar
      default branch: warning if fallback to the hardcoded default · 90fe8375
      Georges Racinet authored
      With the updating logic in `py-heptapod` and in the Rails app,
      we should never have to fallback to the hardcoded `branch/default`,
      except maybe on empty repos.
      
      Of course future migration of `hg_git` projects to `hgitaly` project
      will copy over the default branch information from the auxiliary
      Git repo to the Mercurial repo.
      90fe8375
    • Georges Racinet's avatar
      default branch: GitLab expects a ref · 740a9978
      Georges Racinet authored
      Despite its name, `FindDefaultBranchName` is actually expected
      to return a branch ref instead of a branch name.
      
      Given something else than a branch ref, the Rails app
      `Gitlab::Git.branch_name` returns `nil` (as of GitLab 12.10)
      740a9978
  14. Jun 23, 2020
  15. Jun 20, 2020
    • Georges Racinet's avatar
      (very partial) ref service: FindTag and FindAllTag · 16776923
      Georges Racinet authored
      This is partial because we don't have at the moment a clear way to
      get the commit responsible for the tag value, which would be
      needed to provide authorship and tag contents.
      
      In `mercurial.tags`, what is called `hist` is a list of previous
      tag *values*, hence is not what we need.
      
      Trying to reproduce the tag resolution logic, even with knowledge of
      the target changeset looks to be at best risky.
      
      Efficient extraction of that information would probably entail doing
      it along the target node information, and probably more caching.
      16776923
    • Georges Racinet's avatar
      ref service: updated comment about tags · 2ddf34a6
      Georges Racinet authored
      - decided to use the 'SPEC' marker wherever what's expected is
        not clear. Does not imply a formal specification can really
        be found.
      - tagtype() uses caches, so the comment was either obsolete
        or overblown.
      2ddf34a6
  16. Jun 23, 2020
    • Georges Racinet's avatar
      ref service: PackRefs · 5081b184
      Georges Racinet authored
      of course it does nothing. Contrary to `ListNewCommits`,
      calling it is not a hard error, as calling it by mistake
      is somewhat harmless (less critical than pre-receive checks).
      5081b184
    • Georges Racinet's avatar
      ref service: ListNewCommits/ListNewBlobs not relevant · f3297135
      Georges Racinet authored
      All explained in the docstrings, we probably never will
      implement them for Mercurial. On the client side, all
      currently existing callers must be rewritten
      anyway.
      f3297135
    • Georges Racinet's avatar
      ref service: ListTagNamesContainingCommit · 043d62f1
      Georges Racinet authored
      Same as sibling method for branches, we'll have to cope with
      ordering, but that can probably wait.
      043d62f1
    • Georges Racinet's avatar
      ref service: ListBranchNamesContainingCommits · b1dc70f8
      Georges Racinet authored
      At this point, the ordering of results is arbitrary.
      We don't expect that to be a problem until after the
      first end-to-end experiments.
      
      Implicitely expected ordering is specified in comment.
      
      Implementation is probably somewhat inefficient. It's a bit
      frustrating that in Mercurial we know right away to which
      branch a commit relates (contrary to Git) but still have to
      do all these ancestry computations.
      
      But it would be easy to be wrong if trying to be smarter.
      b1dc70f8
    • Georges Racinet's avatar
      util.chunked: with limits · 3346666b
      Georges Racinet authored
      This is a simple way to limit the number of items in responses,
      although we expect many cases to actually be better implemented
      by passing the limit down to the thing that produces the iterable
      being chunked
      3346666b
  17. Jun 20, 2020
    • Georges Racinet's avatar
      ref service: DeleteRefs, refusing to perform · 981cb175
      Georges Racinet authored
      We could want a different behaviour later on:
      
      - silently ignoring the request (for now we're happy to have
        errors as a bug catcher)
      - close branches if that is relevant (but perhaps we'll want
        a new rpc call for that).
      981cb175
Loading