1. 21 Apr, 2021 4 commits
  2. 04 Mar, 2021 5 commits
  3. 28 Feb, 2021 2 commits
  4. 22 Feb, 2021 1 commit
  5. 21 Feb, 2021 2 commits
    • Matt Harbison's avatar
      Synchronize `keyring_supported_smtp()` with core `mail._smtp()` · acc2430756a9
      Matt Harbison authored
      Aside from the customization of fetching the password from the store, I left the
      default config arg for `smtp.tls` and the `util.safehasattr(socket, 'ssl')`
      check for TLS to support ancient Mercurial versions.
      
      I think this area could be improved greatly by changing Mercurial to have a
      separate function that fetches the username/password that this extension could
      wrap and replace, and another function that can be given a username/password to
      try the login.  That would eliminate a lot of code duplication that I'm not
      entirely convinced is py3 safe in core Mercurial, such as passing the exception
      to `error.Abort` a couple lines below.
      acc2430756a9
    • Matt Harbison's avatar
      Byteify all `ui.config()` calls · 7ad91f572a89
      Matt Harbison authored
      Mercurial both wants and returns bytes from these.
      7ad91f572a89
  6. 20 Feb, 2021 4 commits
  7. 02 Feb, 2021 1 commit
  8. 23 Nov, 2020 2 commits
    • Matt Harbison's avatar
      Byteify the message argument to `ui_string()` · e4e41ce8c509
      Matt Harbison authored
      This is a thin wrapper around `mercurial.i18n._()` and as noted in the previous
      commit, that is not meant to handle unicode.  We could fix that function to
      convert internally before passing through, but I'm used to passing bytes to
      these Mercurial internals, and every time I saw it I thought these needed to be
      fixed.  Additionally, if translations are ever made, it should probably be done
      in the same manner as core Mercurial (based on bytes).  The trailing arguments
      are converted to bytes by `ui_string()` before interpolation, so this won't
      introduce any incompatabilities.
      e4e41ce8c509
    • Matt Harbison's avatar
      Byteify the message argument to `mercurial.i18n._()` · 85ba8256007b
      Matt Harbison authored
      As noted in 4a2d0ce50f5a, it's not intended for _() to convert from unicode, and
      it doesn't always work.  For the uses where values are interpolated, they will
      not be `None`, given the checks that precede them.
      85ba8256007b
  9. 22 Nov, 2020 3 commits
    • Matt Harbison's avatar
      Disable a couple of pytype errors related to conditionalized compatability · 88665ac952a7
      Matt Harbison authored
      At this point, there are no more things that pytype is flagging, so it will need
      some annotations on core Mercurial code.
      88665ac952a7
    • Matt Harbison's avatar
      Add infrastructure for running `pytype` · dfd2957e16b3
      Matt Harbison authored
      The makefile and config file were copied from TortoiseHg.  The location of the
      `mercurial-extension_utils` repo is assumed to be next to this repo for
      simplicity.
      dfd2957e16b3
    • Matt Harbison's avatar
      Byteify registered command help and the `buglink` attribute · 4a2d0ce50f5a
      Matt Harbison authored
      I hit this in various test-check-* tests for Mercurial when running on a zstd
      repo without the C extensions, but this can be trivially reproduced with
      `HGPLAIN=1`:
      
          *** failed to import extension mercurial_keyring: unicode 'keyring_check [PATH]' found in cmdtable.keyring_check
          *** (use b'' to make it byte string)
      
      The issue is that `i18n._()` wants bytes, but leaves a backdoor for `str` for
      docstrings.  That backdoor is closed if `HGPLAIN` or `HGPLAINEXCEPT` is set
      (unless `i18n` is set in `HGPLAINEXCEPT`).  There are a bunch of other uses of
      this function that still need to be byteified.
      
      The global `buglink`, `testedwith`, and `minimumhgversion` also want to be
      bytes.
      4a2d0ce50f5a
  10. 08 Aug, 2020 5 commits
  11. 27 Jun, 2020 4 commits
  12. 14 Jun, 2020 2 commits
  13. 24 Nov, 2019 1 commit
  14. 11 Nov, 2019 4 commits