Skip to content
Snippets Groups Projects
  1. Jan 03, 2022
  2. Dec 26, 2021
  3. Nov 26, 2021
  4. Nov 22, 2021
  5. Nov 20, 2021
    • Georges Racinet's avatar
      MercurialRepository.Push: prevent auto-publication and GitLab sync · bd3911e6
      Georges Racinet authored
      The GitLab sync would need to get user information to ask for
      permission (pre-receive hook) and to send resulting information
      (post-receive hook). This would require changing a bunch of internal
      APIs in the Rails application for the `hg-push` mirror update use case
      (currently the only one).
      
      Furthermore, the post-receive hook would in turn
      trigger an update of the `hg-push` remote mirror, resulting in effect in an
      infinite loop of pushes (we've witnessed the state maintainer `pretxnclose`
      Mercurial hook running even if no auto publication occurred).
      
      This can be improved later on, but for now, we'll make the push
      effectively read-only by disabling auto publication, and that
      allows us to unplug the GitLab state maintainer (`heptapod_sync`).
      
      Users of `hg-push` mirrors will see an explicit message in the
      mirror settings page in the case where the push would have been
      publishing. Chances are that publication by the mirrorring would
      have been very unwelcome anyway (note also that in its first
      incarnation, the Rails app won't expose the `include_drafts` boolean).
      bd3911e6
  6. Nov 18, 2021
  7. Nov 22, 2021
    • Georges Racinet's avatar
      MercurialRepositoryService.Push: main implementation · 045e053f
      Georges Racinet authored
      We separate the concern of initialization of the remote peer in
      the new `hgitaly.peer` module. URLs referencing the local file
      system of the HGitaly server are accepted (for they are very
      convenient in tests) yet restrained to the relevant storage, thus
      not adding more rights than the callers already have. We expect
      the logic to be the same for future subsystems using remote peers.
      
      SSH remotes are not implemented yet.
      
      The test case for exception raised by `urlparse()` would not
      pass with Python 3.7 (NKFC normalization exception was introduced
      in Python 3.8), this was actually the original motivation for
      dropping Python 3.7 compatibility (see 019dc802a624).
      
      Closes #87
      045e053f
  8. Nov 18, 2021
    • Georges Racinet's avatar
      SSH test helpers · 52dd4c16
      Georges Racinet authored
      This provides facilities to start SSH servers constrained to
      a single user and use them from `hg` commands, complete with host
      and user key pairs.
      
      `hgitaly.testing.tests.test_sshd` demonstrates a successful push
      using them, allowing the forthcoming tests for service methods using
      SSH to focus on their own business.
      52dd4c16
  9. Nov 22, 2021
  10. Nov 05, 2021
    • Georges Racinet's avatar
      MercurialRepository.Push: protocol, stubs and boilerplate · 2f61efc6
      Georges Racinet authored
      As all changes of protocol, this warrants a bump in minor version.
      
      A separate message is introduced to describe the remote peer,
      so that it can become the standard for future gRPC methods (we'll have
      at list a `Pull` at some point).
      
      Included the implementation and tests boilerplate to make subsequent
      changesets more to the point.
      2f61efc6
  11. Nov 18, 2021
  12. Nov 15, 2021
  13. Nov 14, 2021
  14. Oct 26, 2021
  15. Oct 17, 2021
  16. Nov 11, 2021
  17. Oct 25, 2021
  18. Nov 10, 2021
  19. Nov 05, 2021
  20. Nov 03, 2021
Loading