1. 18 Feb, 2022 1 commit
  2. 15 Feb, 2022 4 commits
  3. 14 Feb, 2022 2 commits
  4. 12 Feb, 2022 1 commit
    • Georges Racinet's avatar
      HgGitRepository tests: removed wrong repository creation · cb64e623b8ab
      Georges Racinet authored
      With the `empty_repository` fixture, the repository is already
      created.
      
      Apparently, Gitaly 14.5 does not return an error (Git
      repo creation occurs first) but 14.6 will.
      
      In any case, we can as well avoid it on the stable branch.
      
      --HG--
      branch : heptapod-stable
      cb64e623b8ab
  5. 11 Feb, 2022 7 commits
    • Georges Racinet's avatar
      Project import form: revalidation on change of VCS type · 71b49873186e
      Georges Racinet authored
      Of course, if VCS type changes, any previous validation of
      remote endpoint (Git or Mercurial) has to be done again.
      
      Was really painful to make work because the previously used
      CSS selector, although seemingly meant to return only the
      element from the active pane, was actually returning two of
      them, and events were attached on the wrong one.
      
      Side remark: as soon as the URL field loses focus (meaning
      the user finished enter a value), the `isProjectImportUrlDirty`
      becomes true, and stays so even validation result is already
      known and there are no further changes. Therefore it does not mean
      "change that has not yet been taken into account" but "changed at
      least once from initial value".
      
      --HG--
      branch : heptapod-stable
      71b49873186e
    • Georges Racinet's avatar
      Import Form: make VCS type select *not* seem disabled · f69d7b5beb2b
      Georges Racinet authored
      Part of #621
      
      --HG--
      branch : heptapod-stable
      f69d7b5beb2b
    • Georges Racinet's avatar
      Heptapod CI/Knapsack tests: remote repo validation in regular runs · 9f5e17fb6f59
      Georges Racinet authored
      This seems to be a worthwile addition, especially because of the
      critical nature of imports (main use case for this validation service)
      
      --HG--
      branch : heptapod-stable
      9f5e17fb6f59
    • Georges Racinet's avatar
      Import form: proper validation of remote Mercurial HTTP server · 4c79faeb7663
      Georges Racinet authored
      We transmit over the VCS Type from JavaScript code, and pass it down
      to the service, which was already able to validate remote Mercurial
      servers.
      
      Closes #524
      
      --HG--
      branch : heptapod-stable
      4c79faeb7663
    • Georges Racinet's avatar
      Import services: remote repo validation for Mercurial · 9441ad7ca8cb
      Georges Racinet authored
      We are piggy-backing on the existing code for Git, although the
      Mercurial case is simpler: the capabilities request is meant
      for that, and can be taken whole.
      
      At this point, the enforcement for Mercurial is not yet
      plugged into the UI (or rather, the frontend calls the Git
      check, which explains the comeback of #524), but
      it is already active with the API.
      
      This can probably still be used in the auto-detection of
      #406, by using the service twice, for Git and Mercurial.
      
      --HG--
      branch : heptapod-stable
      9441ad7ca8cb
    • Georges Racinet's avatar
      Import form: display URL validation alert · 92438eb22cc9
      Georges Racinet authored
      Related to the comeback of #524. This should not
      have been removed, at least not in current context: it is
      not the validation error blocking import, rather the corresponding
      user feedback.
      
      --HG--
      branch : heptapod-stable
      92438eb22cc9
    • Georges Racinet's avatar
      Gitlab::Vcs: adopted constant from Project model · 818f4b4612f0
      Georges Racinet authored
      There are cases when we'll need it without an existing
      `Project` instance. First use cases in Project creation
      process. Will also help possible refactoring to move
      `Project.mercurial?` to the `Repository` model.
      
      --HG--
      branch : heptapod-stable
      818f4b4612f0
  6. 04 Feb, 2022 3 commits
  7. 03 Feb, 2022 8 commits
  8. 30 Jan, 2022 2 commits
  9. 26 Jan, 2022 3 commits
  10. 25 Jan, 2022 2 commits
  11. 24 Jan, 2022 1 commit
  12. 23 Jan, 2022 3 commits
  13. 22 Jan, 2022 3 commits
    • Georges Racinet's avatar
      Heptapod::NativeMigrator: save Note only if needed · 90e5bdf101d7
      Georges Racinet authored
      This simple pattern could be later generalized.
      
      Doing it right now for `Note` only because they are
      the most numerous of the records to migrate.
      
      Some figures from my dev workstation:
      
      re-migrating HGitaly goes down from 90 to 30s
      initial migration of hg-git down from 240 to 150s
      
      --HG--
      branch : heptapod-stable
      90e5bdf101d7
    • Georges Racinet's avatar
      NativeMercurial::Migrator: skip commit diff_refs check · d63e143d0e40
      Georges Racinet authored
      The `:diff_refs_match_commit` validator cannot work during the
      migration, because the commit id is now a Mercurial SHA while
      the repository class is still `HgGitRepository` and the Rugged
      implementation is typically active.
      
      We could have used the `importing?` transient boolean instead of
      creating a new one. Heres' why we chose not to:
      
      - impact could be bigger in these mixins. It is possible that
        upstram had a good reason not to use it.
      - `DraftNote#importing?` is always false
      
      One could argue that this removes an interesting consistency check
      but:
      
      - there are protections against `commit_id` being `nil` and perhaps
        something similar with `position`.
      - we would need to instantiate `HgitalyRepository` specifically
        to perform it. This can be done in a follow-up if it feels
        too dangerous, and it would need the same boolean flag.
      
      --HG--
      branch : heptapod-stable
      d63e143d0e40
    • Georges Racinet's avatar
      NativeMercurial::Migrator: error log for failed Note migration · 68a6c8be18f6
      Georges Racinet authored
      The Note id is a must-have in the logs.
      
      --HG--
      branch : heptapod-stable
      68a6c8be18f6