Skip to content
Snippets Groups Projects
  1. May 13, 2020
    • Georges Racinet's avatar
      requirements: update hg-git · 1a8f3f492241
      Georges Racinet authored
      On Mercurial 5.2, there was no official compatible version yet.
      We were using tags put in the legacy Heptapod fork of hg-git.
      
      The freshly released hg-git 0.9.0a1 is compatible all the way
      up to Mercurial 5.4
      1a8f3f492241
  2. May 09, 2020
  3. May 08, 2020
  4. May 06, 2020
  5. May 05, 2020
    • Georges Racinet's avatar
      Typo in docstring · f6622702df2b
      Georges Racinet authored
      f6622702df2b
    • Georges Racinet's avatar
      gitlab-mirror: simplify case of topic change by public changeset · 0b995383421b
      Georges Racinet authored
      For the call to `published_topic_latest_hg_sha` in the case the
      previous changeset is obsoleted by a public changeset, since we now get
      `None` if the successor is not on topic, we can avoid checking
      that condition in advance, to test the `None` return value explicitely
      without creating dead code.
      
      Using a revset for that will be marginally slower.
      0b995383421b
    • Georges Racinet's avatar
      gitlab-mirror: recover if latest changeset of published topic can't be found · fa72d730f498
      Georges Racinet authored
      This condition was an indication of corruption, but refusing the push
      currently does much more harm than cleaning up the condition, even
      if the cleanup risks itself to turn out wrong.
      
      In the case detailed in heptapod#265, we had a Git repository
      inconsistency which we could only reproduce manually by forcing
      the Git branch for the topic: the previously know topic head was
      both public and not on topic.
      
      Getting `None` in the other call to
      `published_topic_latest_hg_sha` can't happen,
      but this will have to be refactored for clarity.
      fa72d730f498
  6. May 03, 2020
    • Georges Racinet's avatar
      hooks: work from a share · d89ffa5e2d7e
      Georges Racinet authored
      We're going to need to send GitLab hooks from the temporary
      working directories (shares) that are used in Rails to perform
      operations. For that, the path to the Git repo must be inferred
      from the share source path.
      d89ffa5e2d7e
  7. Apr 26, 2020
    • Georges Racinet's avatar
      Taking GitLab repo description from GL_REPOSITORY · f036a324a62e
      Georges Racinet authored
      We make `GL_REPOSITORY` the norm to describe the repo in
      GitLab terms:
      
      - in `wsgi.py`, we now expect to receive it from Heptapod Workhorse,
        matching changes done there right after the merge with the version
        for GitLab 12.3.5. In the subprocess call case (gitlab-shell or
        Rails app), we already had it.
      - instead of hardcoding `project-$id` to pass it to GitLab API
        endpoints, which was too restrictive, we just repass it over
      - we still produce a `HEPTAPOD_PROJECT_ID` environment variable
        for external Mercurial hooks, but now we derive it from
        GL_REPOSITORY
      f036a324a62e
  8. Apr 30, 2020
  9. Apr 29, 2020
  10. Apr 25, 2020
  11. Apr 26, 2020
  12. Apr 24, 2020
  13. Apr 20, 2020
    • Georges Racinet's avatar
      GitLab hooks: handling connection errors · 53fdbb7ab328
      Georges Racinet authored
      The returned message is very generic, but the exact cause will
      be ovious in the logs. Most immediate case is misconfiguration.
      53fdbb7ab328
    • Georges Racinet's avatar
      Fixed conditional imports through requests in hg "bare" context · 8cca59bd3923
      Georges Racinet authored
      Some libraries have to be excluded from the `demandimport` mechanism,
      because the requests library has conditional imports and checks and them.
      
      There wasn't any problem with these in early tests, all conducted
      in HTTP context: probably gunicorn did an earlier, regular import.
      
      But through SSH, which spawns a `hg` subprocess directly,
      the problem is immediate.
      8cca59bd3923
  14. Apr 19, 2020
  15. Mar 10, 2020
    • Georges Racinet's avatar
      GitLab hooks: post-receive directly through internal REST API · a9f1a24b9679
      Georges Racinet authored
      This implements the `post-receive` hook by a direct HTTP call to the
      internal API endpoint. For this, two new config parameters in the
      `heptapod` section are introduced:
      
      - gitlab-internal-api-secret-file
      - gitlab-internal-api-url
      
      
      We're keeping the previous structure, with a `name`
      that's now almost useless and leads us to the
      complication of the `_hook_methods` dict.
      This keeps compatibility for the caller (also
      part of this package since Heptapod 0.12), allowing
      us to refactor in a separate step.
      a9f1a24b9679
  16. Apr 23, 2020
  17. Feb 17, 2020
  18. Apr 20, 2020
    • Georges Racinet's avatar
      hook check_publish: porting to future hg 5.4 · cac20dfe000d
      Georges Racinet authored
      The structure of the `phases` transaction attribute has changed.
      It's now a list of (key, value) pairs instead of a dict,
      and keys are lazy ranges (`xrange` in Python2) of revision numbers.
      
      The new unit test doesn't prove it really works for a given
      Mercurial version, only a separate run will do that, but it'll
      help developers work on both versions at once if they need to
      change the logic.
      cac20dfe000d
  19. Mar 27, 2020
    • Georges Racinet's avatar
      tests: using a more universal rebase call · d325833962a6
      Georges Racinet authored
      In Mercurial 5.3, `source` and `base` are single valued, hence
      just a string, whereas in current default branch, future 5.4,
      they become lists.
      
      We could fix that by version introspection, but in that case, we're
      rebasing a topic with a single changeset, so that switching to
      the implicit form, or `rev`, which is already expected to be
      a list should work for both versions.
      d325833962a6
  20. Apr 20, 2020
  21. Apr 18, 2020
  22. Apr 05, 2020
Loading