Skip to content
Snippets Groups Projects
  1. May 16, 2020
  2. May 14, 2020
  3. Apr 26, 2020
    • Georges Racinet's avatar
      Wiki: made `master` Git branch always identical to `branch/default` · f425f770
      Georges Racinet authored
      GitLab wikis only read from `master`, and that's
      pretty hardcoded, down the way to Gitaly, which itself embeds the
      Gollum library, instead of just providing raw repo content.
      
      Since we don't want to fork Gitaly, as long as we are using a Git mirror,
      it's simpler to tie the `master` and `branch/default` Git branches
      together in the case of wikis.
      f425f770
  4. May 13, 2020
  5. May 09, 2020
  6. May 08, 2020
  7. May 06, 2020
  8. May 05, 2020
    • Georges Racinet's avatar
      Typo in docstring · f6622702
      Georges Racinet authored
      f6622702
    • Georges Racinet's avatar
      gitlab-mirror: simplify case of topic change by public changeset · 0b995383
      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.
      0b995383
    • Georges Racinet's avatar
      gitlab-mirror: recover if latest changeset of published topic can't be found · fa72d730
      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.
      fa72d730
  9. May 03, 2020
    • Georges Racinet's avatar
      hooks: work from a share · d89ffa5e
      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.
      d89ffa5e
  10. Apr 26, 2020
    • Georges Racinet's avatar
      Taking GitLab repo description from GL_REPOSITORY · f036a324
      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
      f036a324
  11. Apr 30, 2020
  12. Apr 29, 2020
  13. Apr 25, 2020
  14. Apr 26, 2020
  15. Apr 24, 2020
  16. Apr 20, 2020
    • Georges Racinet's avatar
      GitLab hooks: handling connection errors · 53fdbb7a
      Georges Racinet authored
      The returned message is very generic, but the exact cause will
      be ovious in the logs. Most immediate case is misconfiguration.
      53fdbb7a
    • Georges Racinet's avatar
      Fixed conditional imports through requests in hg "bare" context · 8cca59bd
      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.
      8cca59bd
  17. Apr 19, 2020
  18. Mar 10, 2020
    • Georges Racinet's avatar
      GitLab hooks: post-receive directly through internal REST API · a9f1a24b
      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.
      a9f1a24b
  19. Apr 23, 2020
  20. Feb 17, 2020
  21. Apr 20, 2020
    • Georges Racinet's avatar
      hook check_publish: porting to future hg 5.4 · cac20dfe
      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.
      cac20dfe
Loading