1. 15 Nov, 2021 2 commits
  2. 13 Nov, 2021 1 commit
    • Georges Racinet's avatar
      GitLab hooks: removed annoying and misleading failure message · 0db46e66b9fd
      Georges Racinet authored
      The original wording was appropriate when the pre-receive call was
      done actually after the transaction. It was then useful to warn the
      user of a possible decrepancy. But an error in pre-receive has long
      since become a trigger for transaction abort.
      On the other hand, the original message was still appropriate for
      the post-receive call, expanding it a bit to include "actions" not
  3. 11 Nov, 2021 1 commit
  4. 10 Nov, 2021 1 commit
  5. 03 Nov, 2021 9 commits
  6. 25 Oct, 2021 1 commit
    • Georges Racinet's avatar
      Closed branches: don't break if no new changeset in transaction · cf9852a71d45
      Georges Racinet authored
      The `%d` in the revset used to analyse new changesets produces
      a hard error if the revno does not exist, instead of an empty
      We could later on try and introduce a logic similar to MR detection,
      but the topic is not always visible to GitLab anyway, for instance
      if the closing changeset is the only one, so that would require
      more changes.
      Meanwhile, we have a solution for one of the cases of heptapod#452
  7. 03 Nov, 2021 1 commit
    • Georges Racinet's avatar
      Error handling: ensure tracebacks are produced in GitLab mirror hook · db8189107a65
      Georges Racinet authored
      (adapted graft of 4728e33a7d5c)
      Here we consider straight Abort errors to be user errors, hence not
      warranting a server-side traceback in the logs. On the other hand, all
      other uncatched errors will be logged at error level.
      This makes use of `hg-loggingmod` 0.3.0 ability to log tracebacks in
      the logs.
      This can certainly be improved further, as it doesn't prevent
      server-side tracebacks to be displayed to SSH clients, for instance.
  8. 28 Oct, 2021 1 commit
    • Georges Racinet's avatar
      Tests: force pytest<6 to workaround problem with error.Hint · 09870b83b236
      Georges Racinet authored
      This solves this problem in tests of testhelpers:
              # actual error is FilteredRepoLookupError up to 5.9 and will
              # be InputError in 6.0 (current default head of Mercurial, does not
              # bear the version yet)
      >       with pytest.raises(error.Hint) as exc_info:
      E       TypeError: expected exception must be a BaseException type, not Hint
      heptapod/testhelpers/tests/test_repo_wrapper.py:54: TypeError
      The queston would be whether it'd be reasonable to make `error.Hint`
      subclass `Exception` (or `BaseException`).
      Also pytest<6 works for me, but that doesn't mean pytest 6.0.0 was the
      one to start demanding exceptions to be subclass `BaseException`.
  9. 25 Oct, 2021 5 commits
  10. 17 Oct, 2021 3 commits
    • Georges Racinet's avatar
      testhelpers: fixed test for future Mercurial 6.0 · 519d34905251
      Georges Racinet authored
      This is not upstream in mercurial_testhelpers because it depends
      on the `prune` command.
    • Georges Racinet's avatar
      Merged hgitaly2 branch into default branch · 52cb5e428ac3
      Georges Racinet authored
      This long-running named branch was to carry intrusive changes
      necessary for operation without any auxiliary Git repository.
      As of !65, we've reached the point were everything is neatly
      separated and fully optional, depending on choices made by the
      other Heptapod components.
      I have checked as thoroughly as possible that using the `hgitaly2`
      branch of py-heptapod didn't break anything (unit/integration tests,
      functional tests).
    • Georges Racinet's avatar
      Heptapod CI: run hg default and hg stable for hgitaly2 branch · 7cd174aa67e8
      Georges Racinet authored
      This is to make sure everything is alright before we merge the
      hgitaly2 branch into default.
      (to be ignored in the final merge)
  11. 12 Oct, 2021 2 commits
  12. 17 Oct, 2021 4 commits
    • Georges Racinet's avatar
      test_integration: preparations to derive as tests without Git · 66f073f6c089
      Georges Racinet authored
      These should be only spelling and type changes, meant so that
      the diff with the future tests of a native state maintainer without
      a Git repository are easier to compare with these.
      This explains some weird line breaks, such as:
              'foo', message='some msg')
      because it will become in the tests for the future class something
          ctx = wrapper.commit_file(
      with the second line unchanged.
      We also take the opportunity to modernize the calls to the
      deprecated `write_commit()`.
    • Georges Racinet's avatar
      test_integration: fixed and factorized test_topic_rebase_publish() · 4c4b53691f8b
      Georges Racinet authored
      Because of a missing `parent` keyword in `write_commit()`, the
      rebase was actually trivial.
      The factorization with `test_topic_add_rebase_publish()` will
      make it easier to adapt for the future state maintainer with no
      Git repo.
    • Georges Racinet's avatar
      prune_reasons.BranchClosed: keep tuples in native back-conversion · 7f4f24facb55
      Georges Racinet authored
      The back conversion was converting the 2-tuple to a list of
      length 2.
      This didn't change anything in the end serialization (`json`
      converts tuples and lists alike anyway), but it was a small pain
      for the writing of uniform test cases for future native state
      maintainers without any back-conversion.
    • Georges Racinet's avatar
      testhelpers.gitlab: new assert_default_gitlab_branch() method · c5b6b9f8cf69
      Georges Racinet authored
      This makes `git.test_integration` more readable and will be used
      identically in tests for the future state maintainer with no Git
  13. 11 Oct, 2021 3 commits
    • Georges Racinet's avatar
      Ensuring GitLab state files: do not create Git repository · bdf767406a0d
      Georges Racinet authored
      In the fully native mode, without any conversion to Git, it will
      still be potentially useful to be able to read a leftover Git repo
      if the GitLab project was marked as fully native without the
      expected call to the various `ensure_*` methods.
      But we don't want any Git repo to be created, and that is a
      side effect of using `self.git.refs`.
      In Heptapod functional tests, we will add assertions on absence
      of Git repo to be 100% sure that they pass without any unwarranted
      help (one could imagine first an empty repo, then a push would
      trigger the mirror and suddenly one is not testing the fully native
      mode as expected).
      It would be tempting to init the default GitLab branch directly
      as `branch/default`, but that would be the implicit false promise
      that there is a commit on the `default` branch, and our logic
      to correct the initial default Gitlab branch name is probably not
      able to cope with that. So better keep the default Git value.
    • Georges Racinet's avatar
      Test fixtures: extracted a GitLabStateMaintainerFixture base class · ebfb0b7b148b
      Georges Racinet authored
      It will be useful to test the future `NativeStateMaintainer` class
    • Georges Racinet's avatar
      testhelpers: testing the GitRepo helper class · 2eb152fab02a
      Georges Racinet authored
      Some methods of this class will soon not be used by py-heptapod's integration
      tests. Since they can be useful downstream in HGitaly, we need to keep them
      and cover them directly.
  14. 13 Oct, 2021 1 commit
  15. 11 Oct, 2021 1 commit
    • Georges Racinet's avatar
      Merged current default branch into hgitaly2 · c496786e8928
      Georges Racinet authored
      With the progress made in other components since the creation of
      the hgitaly2 branch, we will now proceed to introduce a
      NativeStateMaintainer class that won't do any Git conversion.
  16. 03 Aug, 2021 1 commit
  17. 05 Jul, 2021 3 commits