Skip to content
Snippets Groups Projects
  1. Jun 16, 2020
    • Manuel Jacob's avatar
      py3: avoid using %r format on bytes · 7a463053
      Manuel Jacob authored
      Before the patch, the 'b' prefix appeared in the formatted string. Wrapping the
      bytes as pycompat.bytestr solves this problem.
      
      Eventually, I think that we should move away from using %r (like 975e517451a6
      and 4d6019c0e0ef did), but that would change output of non-ASCII bytes on
      Python 2, so we can’t do it on the stable branch. Also, many places continue to
      use %r, so it would be a good idea to do the change all at once.
      7a463053
    • Manuel Jacob's avatar
      py3: use `%d` for int in % formatting · d545b895
      Manuel Jacob authored
      On Python 3, `%s` is an alias to `%b`, which requires that the object implements
      `__bytes__()`, which is not the case for `int`.
      d545b895
    • Manuel Jacob's avatar
      py3: pass native string to urlreq.url2pathname() · 75b59d22
      Manuel Jacob authored
      Of course, I’m not happy with the warning, but it’s better than crashing.
      Solving the problem properly is hard, and non-UTF-8 percent-encoded bytes in
      file URLs seem rare enough to block solving that all file URLs (even if not
      SVN-specific) will cause a crash.
      75b59d22
    • Manuel Jacob's avatar
      py3: suppress DeprecationWarning about deprecated base64 module aliases · de7bdb0e
      Manuel Jacob authored
      base64.encodestring() / base64.decodestring() were renamed to
      base64.encodebytes() / base64.decodebytes() in Python 3. The old names still
      worked, but raised a DeprecationWarning.
      de7bdb0e
  2. Jun 15, 2020
  3. Jun 06, 2020
    • Anton Shestakov's avatar
      tests: adjust to the new format in pyflakes output · 170f8a43
      Anton Shestakov authored
      According to the pyflakes' NEWS.rst, the default output format changed
      recently:
      
        2.2.0 (2020-04-08)
        - Include column information in error messages
      
      So the lines now read:
      
        contrib/perf.py:149:15 undefined name 'xrange'
        mercurial/hgweb/server.py:427:13 undefined name 'reload'
        mercurial/util.py:2862:24 undefined name 'file'
      
      This is a graft of a similar fix that ended up on default.
      
      Differential Revision: https://phab.mercurial-scm.org/D8630
      170f8a43
    • Anton Shestakov's avatar
      tests: consistently use pyflakes as a Python module · f9099e21
      Anton Shestakov authored
      We check availability of pyflakes as a module, and also running it for real as
      a module. Only fair to test filterpyflakes.py working correctly when using
      pyflakes as a module too.
      
      This is a graft of a similar fix that ended up on default.
      
      Differential Revision: https://phab.mercurial-scm.org/D8629
      f9099e21
    • Anton Shestakov's avatar
      tests: skip pyflakes for mercurial/thirdparty/ · 1ca0d5ca
      Anton Shestakov authored
      The current version of pyflakes (2.2.0) correctly detects one issue:
      
        mercurial/thirdparty/selectors2.py:335:40 '...'.format(...) has unused arguments at position(s): 1
      
      But we're not interested in fixing lint errors in third-party code, so we need
      to exclude at least selectors2.py. And in the discussion for this patch it was
      decided to just skip the entire thirdparty directory.
      
      This is a graft of a similar fix that ended up on default.
      
      Differential Revision: https://phab.mercurial-scm.org/D8628
      1ca0d5ca
  4. Jun 13, 2020
  5. Jun 12, 2020
    • Adam Hull's avatar
      ignore: note debugignore on ignore man page · b77d5b56
      Adam Hull authored
      It took me a long time to find debugignore. I found the ignore man page
      quickly. This change adds a debugging section to the ignore man page
      letting people know there is a debug command.
      b77d5b56
  6. Jun 13, 2020
  7. Jun 09, 2020
  8. Apr 30, 2020
  9. Jun 05, 2020
  10. Jun 02, 2020
    • Yuya Nishihara's avatar
      graft: fix --base value to be saved in state file · 2dc5ae95
      Yuya Nishihara authored
      'True' just works because it is treated as an integer revision '1' and
      only the truthiness of the basectx is important. If multiple source revisions
      were supported with --base, the resumed graft operation would go wrong.
      2dc5ae95
  11. May 16, 2020
  12. May 26, 2020
  13. May 14, 2020
    • Manuel Jacob's avatar
      setup: raise minimum Python version to 2.7.4 · 91e509a1
      Manuel Jacob authored
      On older Python versions, Mercurial is not really usable because of
      https://bugs.python.org/issue10211.
      
      Recently someone reported a crash on the mailing list when running Mercurial
      on Python 2.7.3. There was consensus that fixing compatibility for a Python
      version more than 7 years old is not worth it. So, instead of making Mercurial
      crash with an obscure exception, this patch raises the minimum Python version
      to 2.7.4.
      91e509a1
  14. May 19, 2020
    • Connor Sheehan's avatar
      fsmonitor: coerce `clock` variable to byte-string (issue6321) · 017cc5ee
      Connor Sheehan authored
      Callers of `fsmonitor.state.setlastclock` pass their arguments
      wrapped in `pycompat.sysbytes` to ensure the value is a `bytes`
      on Python 3. However in `fsmonitor.poststatus.__call__`, if the
      return value of `getlastclock()` is `None`, we use the value of
      `fsmonitor.poststatus._startclock` instead, which is not converted
      to a byte string in the same manner. This commit converts the
      value of `startclock` to a byte string using `pycompat.sysbytes`
      in the constructor for `poststatus`, to avoid the "`str` + `bytes`"
      error from issue 6321.
      
      Differential Revision: https://phab.mercurial-scm.org/D8573
      017cc5ee
  15. May 15, 2020
  16. May 18, 2020
  17. May 11, 2020
  18. May 14, 2020
  19. May 12, 2020
Loading