This instance will be upgraded to Heptapod 0.19.0 (final) on 2021-01-20 at 14:00 UTC+1

  1. 29 Nov, 2020 8 commits
  2. 28 Nov, 2020 1 commit
    • Georges Racinet's avatar
      take over single head enforcement · 834eb9379d73
      Georges Racinet authored
      See heptapod#351
      
      This prevents the expensive `_filter_obsolete_heads`
      to be called twice on each transaction: the first in
      evolve's `enforcesinglehead`, the second in our analysis
      code for GitLab branches.
      
      In 1.1 versions, we don't want to change the
      meaning of configuration flags, hence we still react
      to `experimental.single-head-per-branch`.
      
      In the future 1.2 versions, however, we will ignore that
      flag and base everything on `heptapod.allow-multiple-heads`,
      hence sparing us the monkey patching.
      834eb9379d73
  3. 27 Nov, 2020 5 commits
    • Georges Racinet's avatar
      GitRefChange: switched to attr.s and kwargs init · cc52bc54d463
      Georges Racinet authored
      This almost data class is a typical use-case for `attr.s` (just
      had a debugging session where a `repr()` implementation would
      have been handy).
      
      I would never be confident about positional args in constructor
      with that declarative style, so changed the
      constructor arguments usage in main code, even if more verbose.
      cc52bc54d463
    • Georges Racinet's avatar
      hg-native: back conversion error case · 6982b5005e9a
      Georges Racinet authored
      This was detected by the `test_push_corrupted` functional
      test. It is a bit irritating to still have to take care
      of that with native projects, but the truth is that all
      the analysis logic really needs to be based on Git SHAs
      because Git actually plays the role of the GitLab branch
      map that we don't have.
      6982b5005e9a
    • Georges Racinet's avatar
      Excluding dulwich backport from coverage · 66ae6a19fb10
      Georges Racinet authored
      the backport is released in dulwich 0.20.14 and our
      unit test proves that it has indeed been included, as
      expected.
      
      Not removing the backport yet because py-heptapod is
      still pinned to an older dulwich, but will do as soon
      as I have time to check the changes that bumping to the
      new release will also bring (expecting bugfixes only).
      66ae6a19fb10
    • Georges Racinet's avatar
      Added tag 1.1.1 for changeset 1086f24bfc6d · 442fde8a7180
      Georges Racinet authored
      442fde8a7180
    • Georges Racinet's avatar
      Setting version for release · 1086f24bfc6d
      Georges Racinet authored
      Forgot to commit/tag yesterday
      1086f24bfc6d
  4. 24 Nov, 2020 1 commit
    • Georges Racinet's avatar
      dulwich: backporting fix for bytes problem in alternates · a3d8f1eb9232
      Georges Racinet authored
      Sub-classing Dulwich whole testcase brings in all the tests
      from that class, but we don't care: they pass in less than a
      second.
      
      Given the release rate of dulwich, a new version should be
      available soon, but we haven't tested anything from 0.20.5.
      It doesn't look like the best time to update. In any case
      the backport gives us more options.
      
      Closes heptapod#370
      a3d8f1eb9232
  5. 23 Nov, 2020 1 commit
  6. 22 Nov, 2020 2 commits
    • Georges Racinet's avatar
      testhelpers: shortened LocalRepoWrapper as RepoWrapper · 3026eeb6ab92
      Georges Racinet authored
      This is of the same spirit as in mercurial-testhelpers.
      
      We keep a compatibility alias for downstream projects,
      such as HGitaly and hg-loggingmod, but we should be able to
      get rid of it soon.
      3026eeb6ab92
    • Georges Racinet's avatar
      testhelpers: using new external package · 5708f06346e1
      Georges Racinet authored
      These testhelpers have been externalized as the
      `mercurial_testhelpers` package.
      
      The latter being meant to be identical to a future
      `mercurial.testhelpers` in Mercurial core, they don't
      have facilities for topics nor evolve specific commands.
      
      But the commit options extensibility can be used to
      specify topics in `commit_file`. As for the `prune` helper
      method, it can be implemented by direct subclassing.
      
      This is what `hg-evolve` could later do, if that project
      were to adopt those test helpers. Downstream extensions
      of evolve and topic could then just use a base class
      provided by evolve.
      
      Also, the `RepoWrapper` from `mercurial_testhelpers` has
      two different method names, that we remap directly to
      make the whole test suite pass.
      5708f06346e1
  7. 21 Nov, 2020 1 commit
  8. 11 Nov, 2020 5 commits
  9. 21 Nov, 2020 5 commits
  10. 19 Nov, 2020 3 commits
  11. 18 Nov, 2020 5 commits
    • Georges Racinet's avatar
      git: abort transactions pruning the default GitLab branch · e8f0746800f5
      Georges Racinet authored
      Instead of ignoring the prune (and hence making a slight
      discrepancy between Git and Mercurial content), we will
      refuse the transaction.
      
      Someone with enough commit rights to close the default branch
      can surely change it in the Heptapod project settings.
      
      This is ultimately because the native mode reads Mercurial
      content only. Of course, when it doesn't perform Git conversion,
      we'll still have to port that check, but the functional tests
      are also covering this, so we'll know.
      e8f0746800f5
    • Georges Racinet's avatar
      git: not scheduling prune of default GitLab branch for bookmarks · 4754af38da18
      Georges Racinet authored
      As explained in the doctest, this is very unwanted. Up to now
      we were just removing that prune at the end of the process.
      
      With the native mode (currently still using hg-git) we can't do
      that any more: we will need instead to abort the transaction if
      there is such a scheduled prune (mostly for other reasons, such
      as closed heads). Therefore the simplest here is to not schedule
      the prune.
      4754af38da18
    • Georges Racinet's avatar
      git: separate method for bookmarks filtering and branch prune. · 4f3582264e92
      Georges Racinet authored
      We split out the filtering logic and (GitLab) branch prune
      scheduling related to masking by bookmaks, before we add more
      rules to it, without changing any outcome for now.
      
      This is also an opportunity to clarify the comments and move them
      up the ladder: it's always nicer as a docstring.
      4f3582264e92
    • Georges Racinet's avatar
      git: split out methods to read default Git ref and branch · c53a189d66bd
      Georges Racinet authored
      This is a simple refactor, but we take the opportunity to explain
      the difference with the "default GitLab branch" of native
      repositories: they're stored differently, should be equal wherever
      it makes sense (it won't when native repositories won't use
      hg-git except for mirroring).
      c53a189d66bd
    • Georges Racinet's avatar
      Prune reasons: BookmarkRemoved now stores previous Git SHA · 158b7fe2174c
      Georges Racinet authored
      This puts it in conformity with its docstring. Actually the
      Rails app doesn't make anything of it at this point, but this
      was done along the way.
      158b7fe2174c
  12. 17 Nov, 2020 1 commit
  13. 16 Nov, 2020 1 commit
    • Georges Racinet's avatar
      PreReceive GitLab hook: pass over HEPTAPOD_ACCEPT_MR_IID · bdec902e9e18
      Georges Racinet authored
      Part of heptapod#368: the Rails app will be able to set
      this environment variable and we're now sending it back
      as the `accept_mr_iid` key to the listener for the pre-receive
      hook, so that the Rails app may apply merge permissions instead
      of (direct) push permissions.
      
      Using the (project-local) iid is better than the id, because
      the receiving end won't have to check that someone is trying
      to cheat with a MR on another project and is anyway fast
      compared to the overall amount of process on its side.
      
      --HG--
      branch : heptapod-0-16
      bdec902e9e18
  14. 15 Nov, 2020 1 commit
    • Georges Racinet's avatar
      Mercurial native mode: configuring through WSGI environment · 018805dc73db
      Georges Racinet authored
      This is part of heptapod#364.
      
      Heptapod Workhorse will pass the `X-HEPTAPOD-HG-NATIVE` header
      with the appropriate value, and we use it to set configuration
      on the wished repository accordingly.
      
      We could have made the `env` argument of the `load_repo()` method
      optional (and hence hadn't needed to adapt existing tests), but
      nothing would then prove that it wasn't forgotten, even with coverage
      proving that `load_repo()` is indeed called (which it does).
      018805dc73db