Skip to content
Snippets Groups Projects
  1. Oct 22, 2020
    • Matt Harbison's avatar
      demandimport: don't raise AttributeError if `exec_module` is missing · 8ed69bd42f10
      Matt Harbison authored
      I assume this was meant to do the check gracefully.  After shoveling a bunch of
      modules into the ignore list in order to get keyring to work out of the box on
      CentOS 8, I hit the following error accessing the password, which the change
      fixes.  Now the SecretStorage backend works out of the box, without any edits to
      the ignore list.
      
          ** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
          ** which supports versions unknown of Mercurial.
          ** Please disable mercurial_keyring and try your action again.
          ** If that fixes the bug please report it to https://foss.heptapod.net/mercurial/mercurial_keyring/issues
          ** Python 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
          ** Mercurial Distributed SCM (version 5.5.2)
          ** Extensions loaded: evolve, topic, rebase, absorb, mercurial_keyring
          Traceback (most recent call last):
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/mercurial_keyring.py", line 230, in _read_password_from_keyring
              password = keyring.get_password(KEYRING_SERVICE, pwdkey)
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/keyring/core.py", line 53, in get_password
              return _keyring_backend.get_password(service_name, username)
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/keyring/backends/chainer.py", line 51, in get_password
              password = keyring.get_password(service, username)
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/keyring/backends/SecretService.py", line 79, in get_password
              return item.get_secret().decode('utf-8')
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/secretstorage/item.py", line 105, in get_secret
              decryptor = Cipher(aes, modes.CBC(aes_iv), default_backend()).decryptor()
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/cryptography/hazmat/backends/__init__.py", line 15, in default_backend
              from cryptography.hazmat.backends.openssl.backend import backend
            File "<frozen importlib._bootstrap>", line 971, in _find_and_load
            File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
            File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/hgdemandimport/demandimportpy3.py", line 53, in exec_module
              self.loader.exec_module(module)
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>
              from cryptography.hazmat.backends.openssl.backend import backend
            File "<frozen importlib._bootstrap>", line 971, in _find_and_load
            File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
            File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/hgdemandimport/demandimportpy3.py", line 53, in exec_module
              self.loader.exec_module(module)
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 14, in <module>
              from six.moves import range
            File "<frozen importlib._bootstrap>", line 971, in _find_and_load
            File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
            File "<frozen importlib._bootstrap>", line 894, in _find_spec
            File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/hgdemandimport/demandimportpy3.py", line 117, in find_spec
              and getattr(spec.loader, "exec_module")
          AttributeError: '_SixMetaPathImporter' object has no attribute 'exec_module'
      
      Differential Revision: https://phab.mercurial-scm.org/D9243
      8ed69bd42f10
    • Mitchell Plamann's avatar
    • Gregory Szorc's avatar
      automation: upload Python 3.9 Windows wheels · d1ce0ffdd3ce
      Gregory Szorc authored
      We are producing these. We should be publishing them.
      d1ce0ffdd3ce
    • Gregory Szorc's avatar
      contrib: split Windows requirements into multiple files · d270b9b797a7
      Gregory Szorc authored
      Package support for Python 2 has diverged significantly. It is no
      longer trivial to maintain a single requirements file that supports
      both Python 2 and 3 because the set of packages and versions varies
      wildly.
      
      This commit split up the Windows requirements files so we have
      variants for Python 2 and 3. As part of this, I also renamed the
      files to have what I believe to be more reasonable naming ("win32"
      felt like a weird identifier to me).
      
      We can see that some package versions decreated on 2.7. This is
      because the old pinned versions weren't compatible with Python 2.
      d270b9b797a7
  2. Oct 17, 2020
  3. Oct 19, 2020
  4. Oct 20, 2020
  5. Oct 16, 2020
  6. Oct 12, 2020
  7. Oct 05, 2020
  8. Oct 13, 2020
  9. Oct 15, 2020
  10. Oct 05, 2020
    • Jörg Sonnenberger's avatar
      unbundle: free temporary objects after use · 44d84b726c8a
      Jörg Sonnenberger authored
      This reduces peak RSS for larger unbundle operations by ~30 Bytes per
      changeset on AMD64. This can't be a direct delete for Python 2.7, so
      reset the object instead and leave a comment.
      
      The efilesset object can't be deleted as it is referenced by the local
      onchangelog function and Python 2.7 rejects a delete on the existance of
      a nested scope.
      
      Differential Revision: https://phab.mercurial-scm.org/D9153
      44d84b726c8a
  11. Oct 13, 2020
  12. Oct 14, 2020
  13. Sep 08, 2020
    • Yuya Nishihara's avatar
      revset: add diff(pattern) predicate for "grep --diff" · 99b8b73eb622
      Yuya Nishihara authored
      I find this is useful in GUI log viewer since the tool only needs to support
      "log -rREV" command.
      
      This is basic implementation. Windowed search is not implemented since it
      wouldn't work pretty well with the smartset API. And filename matcher is
      not supported because the syntax isn't determined. My idea is to add handling
      of diff(pattern, file(..)) and diff(pattern, follow(..)), which will then be
      evolved to a full revset+matcher combinator support:
      
        x & diff(pattern, y & z)
                          =====
                          y & z builds (revs(y) & revs(z), matcher(y) & matcher(z))
                          pair, and narrows the search space of diff()
            ====================
            diff() returns matched (revs, matcher) pair
        ========================
        revs and matcher will be combined respectively by &-operator, and the matcher
        will optionally be used to filter "hg log -p" output
      
      The predicate name "diff()" wouldn't be great, but grep() is already used.
      Another options I can think of are "grepdiff()" and "containsdiff()".
      Naming suggestions are welcome.
      99b8b73eb622
  14. Oct 05, 2020
  15. Oct 14, 2020
  16. Oct 05, 2020
  17. Sep 09, 2020
  18. Oct 04, 2020
    • Yuya Nishihara's avatar
      scmutil: move walkchangerevs() from cmdutil · 508dfd1c18df
      Yuya Nishihara authored
      It's no longer a command-level function, but a pure helper to walk revisions
      in a windowed way. This change will help eliminate reverse dependency of
      revset.py -> grep.py -> cmdutil.py in future patches.
      508dfd1c18df
  19. Sep 09, 2020
  20. Oct 13, 2020
  21. Oct 14, 2020
    • Kyle Lippincott's avatar
      record: when backing up, avoid generating very long filenames · 9628d3cd9d13
      Kyle Lippincott authored
      If the original file's path is longer than the individual filename maximum
      length (256 on Linux, I believe?), then this mechanism of "replace slashes with
      underscores" causes an error.
      
      Now, we'll produce just the "basename" of the file, plus some stuff to ensure
      it's unique. This can be potentially confusing for users if there's a file with
      the same name in multiple directories, but I suspect that this is better than
      just breaking.
      
      Example:
      `<reporoot>/a/long/path/to/somefile.txt` used to be backed up as
      `<reporoot>/.hg/record-backups/a_long_path_to_somefile.txt.abcdefgh`, it will
      now be backed up as `<reporoot>/.hg/record-backups/somefile.txt.abcdefgh`
      
      We could do the naive thing (what we were doing before) and have it to doing
      something with either subdirectories
      (`<backuproot>/a/long/path/to/somefile.txt.abcdefgh` or minimize #dirs with
      `<backuproot>/a_long_path/to_somefile.txt.abcdefgh`), prefix-truncated paths
      (such as `<backuproot>/__ath_to_somefile.txt.abcdefgh`, where that `__` elides
      enough to get us under 255 chars (counting the +9 we need to add!)), or
      hash-of-dirname (`<backuproot>/<sha1sum_of_dirname>/somefile.txt.abcdefgh`), but
      ultimately every option felt over engineered and that it would be more likely to
      cause problems than it would be to solve any, especially if it was conditional
      on directory length.
      
      Differential Revision: https://phab.mercurial-scm.org/D9207
      9628d3cd9d13
Loading