Skip to content
Snippets Groups Projects
  1. Dec 10, 2022
  2. May 25, 2022
  3. May 04, 2022
  4. May 03, 2022
  5. Feb 21, 2022
  6. Mar 03, 2022
  7. Feb 07, 2022
  8. Apr 30, 2021
    • Kyle Lippincott's avatar
      black: make codebase compatible with black v21.4b2 and v20.8b1 · f38bf44e
      Kyle Lippincott authored
      I don't know what exact version of black made it care about these whitespace
      differences, but this is the version I got when I just installed it with
      `pip3 install black`.
      
      I'm intentionally not increasing the version of black required, as I don't want
      to force everyone to upgrade their version of black, and these fixes are
      backwards compatible with black v20.8b1. If there are more issues in the future
      and this becomes a maintenance burden I may do so in a future change.
      
      Tested with both versions of black (I got the older version via
      `pip3 install black==20.8b1`)
      
      Differential Revision: https://phab.mercurial-scm.org/D10539
      f38bf44e
  9. Mar 25, 2021
  10. Mar 22, 2021
  11. Feb 12, 2021
  12. Nov 27, 2020
    • durin42's avatar
      formating: upgrade to black 20.8b1 · 89a2afe3
      durin42 authored
      This required a couple of small tweaks to un-confuse black, but now it
      works. Big formatting changes come from:
      
       * Dramatically improved collection-splitting logic upstream
       * Black having a strong (correct IMO) opinion that """ is better than '''
      
      Differential Revision: https://phab.mercurial-scm.org/D9430
      89a2afe3
  13. Nov 06, 2020
    • Gregory Szorc's avatar
      global: use python3 in shebangs · c102b704
      Gregory Szorc authored
      Python 3 is the future. We want Python scripts to be using Python 3
      by default.
      
      This change updates all `#!/usr/bin/env python` shebangs to use
      `python3`.
      
      Does this mean all scripts use or require Python 3: no.
      
      In the test environment, the `PATH` environment variable in tests is
      updated to guarantee that the Python executable used to run
      run-tests.py is used. Since test scripts all now use
      `#!/usr/bin/env python3`, we had to update this code to install
      a `python3` symlink instead of `python`.
      
      It is possible there are some random scripts now executed with the
      incorrect Python interpreter in some contexts. However, I would argue
      that this was a pre-existing bug: we should almost always be executing
      new Python processes using the `sys.executable` from the originating
      Python script, as `python` or `python3` won't guarantee we'll use the
      same interpreter.
      
      Differential Revision: https://phab.mercurial-scm.org/D9273
      c102b704
  14. Jun 17, 2020
  15. Apr 16, 2020
    • Matt Harbison's avatar
      make: drop the `-c` arg to `install` in the documentation makefile · eb9026a8
      Matt Harbison authored
      This arg caused `gmake install` on OpenIndiana 2019.10 (illumos) fail with:
      
          install: The -c, -f, -n options each require a directory following!
          install: The -c, -f, -n options each require a directory following!
          install: The -c, -f, -n options each require a directory following!
          gmake[1]: *** [Makefile:41: install] Error 2
          gmake[1]: Leaving directory '/usr/local/share/mercurial/doc'
      
      The workaround is to run `gmake install-bin`.
      
      The man page for 10.14 says this is to copy the file and is only for
      compatability, as it is the default.  The CentOS 7 man page says it is ignored.
      The top level makefile doesn't use this argument at all, so I'm not sure why
      it's here.
      
      Differential Revision: https://phab.mercurial-scm.org/D8439
      eb9026a8
  16. Nov 22, 2019
  17. Nov 16, 2019
  18. Nov 14, 2019
  19. Nov 08, 2019
    • Augie Fackler's avatar
      cleanup: remove pointless r-prefixes on single-quoted strings · 9f70512a
      Augie Fackler authored
      This is the promised second step on single-quoted strings. These had
      existed because our source transformer didn't turn r'' into b'', so we
      had tagged some strings as r-strings to get "native" strings on both
      Pythons. Now that the transformer is gone, we can dispense with this
      nonsense.
      
      Methodology:
      
      I ran
      
          hg locate 'set:added() or modified() or clean()' | egrep '.*\.py$'  | xargs egrep --color=never -n  -- \[\^b\]\[\^a-z\]r\'\[\^\'\\\\\]\*\'\[\^\'\
      
      in an emacs grep-mode buffer, and then used a keyboard macro to
      iterate over the results and remove the r prefix as needed.
      
      # skip-blame removing unneeded r prefixes left over from Python 3 migration.
      
      Differential Revision: https://phab.mercurial-scm.org/D7306
      9f70512a
  20. Nov 07, 2019
    • Augie Fackler's avatar
      cleanup: remove pointless r-prefixes on double-quoted strings · 313e3a27
      Augie Fackler authored
      This is only double-quoted strings. I'll do single-quoted strings as a
      second step. These had existed because our source transformer didn't
      turn r"" into b"", so we had tagged some strings as r-strings to get
      "native" strings on both Pythons. Now that the transformer is gone, we
      can dispense with this nonsense.
      
      Methodology:
      
      I ran
      
          hg locate 'set:added() or modified() or clean()' | egrep '.*\.py$'  | xargs egrep --color=never -n  -- \[\^a-z\]r\"\[\^\"\\\\\]\*\"\[\^\"\]
      
      in an emacs grep-mode buffer, and then used a keyboard macro to
      iterate over the results and remove the r prefix as needed.
      
      # skip-blame removing unneeded r prefixes left over from Python 3 migration.
      
      Differential Revision: https://phab.mercurial-scm.org/D7305
      313e3a27
  21. Oct 07, 2019
    • Pierre-Yves David's avatar
      formatting: run black on all file again · e8cf9ad5
      Pierre-Yves David authored
      Apparently, since the blackgnarok, we divergence from the expected formatting.
      
      Formatted using::
      
        grey.py -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/** - contrib/grey.py')
      
      # skip-blame mass-reformatting only
      
      # no-check-commit reformats foo_bar functions
      e8cf9ad5
  22. Oct 06, 2019
  23. Apr 26, 2019
  24. May 03, 2019
    • Sietse Brouwer's avatar
      gendoc: guarantee that all commands were processed · 037a97d6
      Sietse Brouwer authored
      The new logic renders the commands belonging to each category in turn.
      Commands with an unregistered category are at risk of getting skipped
      because their category is not in the list. By comparing the list of all
      commands to a log of processed commands, we can detect commands with
      unregistered categories and fail with an error message.
      
      Differential Revision: https://phab.mercurial-scm.org/D6327
      037a97d6
  25. Apr 26, 2019
  26. Apr 25, 2019
  27. Apr 04, 2019
  28. Mar 03, 2019
    • Gregory Szorc's avatar
      setup: define build_doc command · d80d4892
      Gregory Szorc authored
      Currently, various processes for packaging Mercurial state to
      manually invoke `make -C doc` in order to generate the documentation.
      This Makefile merely invokes `gendoc.py` and `runrst` to produce
      man pages and HTML pages.
      
      Not all environments may have the ability to easily run
      Makefiles. Windows is notably in this set.
      
      This commit ports the man page and HTML generation logic from
      doc/Makefile to setup.py. We introduce a new build_doc command
      which generates documentation by calling gendoc.py and runrst.
      The documentation can now be built via pure Python by running
      `python setup.py build_doc`.
      
      We don't implement dependency tracking because IMO it is more
      effort than it is worth.
      
      We could potentially remove the duplicated functionality in
      doc/Makefile. But I'm not sure what all is depending on it. So
      I plan to keep it around.
      
      # no-check-commit because forced foo_bar function names
      
      Differential Revision: https://phab.mercurial-scm.org/D6063
      d80d4892
  29. Feb 04, 2019
  30. Jan 24, 2019
  31. Dec 22, 2018
  32. Dec 20, 2018
  33. Dec 19, 2018
Loading