Skip to content
Snippets Groups Projects
  1. Nov 29, 2020
  2. Nov 28, 2020
    • 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. Nov 27, 2020
    • 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
      1.1.1
      1086f24bfc6d
  4. Nov 24, 2020
    • 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. Nov 23, 2020
  6. Nov 22, 2020
    • 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. Nov 21, 2020
  8. Nov 11, 2020
  9. Nov 21, 2020
  10. Nov 19, 2020
  11. Nov 18, 2020
    • 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. Nov 17, 2020
Loading