Read about our upcoming Code of Conduct on this issue

  1. 23 Jun, 2020 1 commit
  2. 17 Jun, 2020 1 commit
    • Kyle Lippincott's avatar
      py3: fix broken man page generation, it was generating `(default: NUL*)` · 1a4b9b602e54
      Kyle Lippincott authored
      `bytes(default)` was producing things like `(default: \x00)` when handed
      non-bytes values such as `1`, `10`, or `True`. The man page generation would
      apparently ignore these bytes and produce man pages that had the string
      `(default: )`.
      
      Test Plan:
      - Ran `cd doc; python3 gendoc.py "hg.1.gendoc"` and grepped for bad output
      - Ran `make deb`, extracted the deb, manually inspected `hg.1` file.
      
      Differential Revision: https://phab.mercurial-scm.org/D8639
      
      --HG--
      branch : stable
      1a4b9b602e54
  3. 16 Jun, 2020 6 commits
    • Manuel Jacob's avatar
      py3: fix comparison between int and None · 9e5f598fd29b
      Manuel Jacob authored
      If stop is None, the condition was always false on Python 2, as None compares
      smaller than ints. Therefore we make the condition false if stop is None.
      
      --HG--
      branch : stable
      9e5f598fd29b
    • Manuel Jacob's avatar
      py3: pass regex as bytes · 423e20c78e6d
      Manuel Jacob authored
      --HG--
      branch : stable
      423e20c78e6d
    • Manuel Jacob's avatar
      py3: avoid using %r format on bytes · 7a4630536e53
      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.
      
      --HG--
      branch : stable
      7a4630536e53
    • Manuel Jacob's avatar
      py3: use `%d` for int in % formatting · d545b895234a
      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`.
      
      --HG--
      branch : stable
      d545b895234a
    • Manuel Jacob's avatar
      py3: pass native string to urlreq.url2pathname() · 75b59d221aa3
      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.
      
      --HG--
      branch : stable
      75b59d221aa3
    • Manuel Jacob's avatar
      py3: suppress DeprecationWarning about deprecated base64 module aliases · de7bdb0e2a95
      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.
      
      --HG--
      branch : stable
      de7bdb0e2a95
  4. 15 Jun, 2020 4 commits
  5. 06 Jun, 2020 3 commits
    • Anton Shestakov's avatar
      tests: adjust to the new format in pyflakes output · 170f8a43b5b8
      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
      
      --HG--
      branch : stable
      170f8a43b5b8
    • Anton Shestakov's avatar
      tests: consistently use pyflakes as a Python module · f9099e210c57
      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
      
      --HG--
      branch : stable
      f9099e210c57
    • Anton Shestakov's avatar
      tests: skip pyflakes for mercurial/thirdparty/ · 1ca0d5cae9bc
      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
      
      --HG--
      branch : stable
      1ca0d5cae9bc
  6. 13 Jun, 2020 1 commit
  7. 12 Jun, 2020 1 commit
    • Adam Hull's avatar
      ignore: note debugignore on ignore man page · b77d5b568496
      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.
      
      --HG--
      branch : stable
      b77d5b568496
  8. 13 Jun, 2020 1 commit
  9. 09 Jun, 2020 1 commit
  10. 30 Apr, 2020 2 commits
  11. 05 Jun, 2020 5 commits
  12. 02 Jun, 2020 1 commit
    • Yuya Nishihara's avatar
      graft: fix --base value to be saved in state file · 2dc5ae953c4a
      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.
      
      --HG--
      branch : stable
      2dc5ae953c4a
  13. 16 May, 2020 8 commits
  14. 26 May, 2020 1 commit
  15. 14 May, 2020 1 commit
    • Manuel Jacob's avatar
      setup: raise minimum Python version to 2.7.4 · 91e509a12dbc
      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.
      
      --HG--
      branch : stable
      91e509a12dbc
  16. 19 May, 2020 1 commit
    • Connor Sheehan's avatar
      fsmonitor: coerce `clock` variable to byte-string (issue6321) · 017cc5ee537f
      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
      
      --HG--
      branch : stable
      017cc5ee537f
  17. 15 May, 2020 1 commit
  18. 18 May, 2020 1 commit