Skip to content
Snippets Groups Projects
  1. Nov 25, 2020
    • Georges Racinet's avatar
      multiprocessing: taking number of workers from config · 4e13d41b4262
      Georges Racinet authored
      With the `hgitaly.workers` config knob it's possible to
      specify it.
      
      If not specified, the default value is the one computed
      in `hgitaly.server`, i.e. upper rounding of half the number
      of CPUs (as seen by Python `multiprocessing`).
      4e13d41b4262
  2. Oct 10, 2020
    • Georges Racinet's avatar
      coverage: fully testing hgext3rd.hgitaly · 580677ba3695
      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.
      580677ba3695
    • Georges Racinet's avatar
      server: moved init/start logic outside of Mercurial extension · e5d2c2bd6139
      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.
      e5d2c2bd6139
    • Georges Racinet's avatar
      grpcio: requiring at least 1.32 for exception uniformity · 3865ccd5be6f
      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.
      3865ccd5be6f
    • Georges Racinet's avatar
      Python 2: dropping support · edda7778ca27
      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).
      edda7778ca27
  3. Jul 29, 2020
    • Georges Racinet's avatar
      Server command: made --repositories-root work · 3d8700a45b28
      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.
      3d8700a45b28
  4. Jun 19, 2020
    • Georges Racinet's avatar
      Support multiple storages · 5cca85c5e7f5
      Georges Racinet authored
      This was left aside in the project bootstrap.
      We won't actually need multiple storages for a while, hence
      the server command still uses a single `repositories-root`.
      
      But we better have the internals support multiple storages right
      away: its easier to do right now than to add it afterwards.
      5cca85c5e7f5
  5. Jun 17, 2020
  6. Jun 16, 2020
    • Georges Racinet's avatar
      bootstrap: server command · 225920b2ad2e
      Georges Racinet authored
      The command can be launched as `hg hgitaly-serve`. Being actually
      a Mercurial command means it has its help page, generated from
      the docstring and command-line options declaration.
      
      We've made some effort to support Python 2 in the command, but
      currently the actual servicer code is Python 3 only, because of
      type annotations.
      225920b2ad2e
    • Georges Racinet's avatar
      Settled for hgitaly as the extension name · 8d68dd9b3c1d
      Georges Racinet authored
      Even though that feels somewhat redundant, it's less awkward than
      having a hgitaly package next to a hgext3rd.gitaly one.
      8d68dd9b3c1d
  7. Jan 08, 2020
    • Georges Racinet's avatar
      General project structure · e890e844cb26
      Georges Racinet authored
      we will have a `gitaly` Mercurial extension, but that should
      be just a thin registration layer for our command.
      
      Most of the code will be in the `hgitaly` package, for maximum
      flexibility and future proofing in case we really to evade from
      the extension thing.
      e890e844cb26
Loading