Skip to content
Snippets Groups Projects
  1. Nov 22, 2019
  2. Nov 16, 2019
  3. Nov 14, 2019
  4. 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
  5. 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
  6. 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
  7. Oct 06, 2019
  8. Apr 26, 2019
  9. 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
  10. Apr 26, 2019
  11. Apr 25, 2019
  12. Apr 04, 2019
  13. 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
  14. Feb 04, 2019
  15. Jan 24, 2019
  16. Dec 22, 2018
  17. Dec 20, 2018
  18. Dec 19, 2018
    • Matt Harbison's avatar
      py3: byteify docchecker · 9bfbb9fc
      Matt Harbison authored
      The exception is printed as str because I'm too lazy to convert it and the
      pieces.
      9bfbb9fc
    • Matt Harbison's avatar
      py3: byteify gendoc.py · e10641c4
      Matt Harbison authored
      This is mostly b'' prefixing, with some cargoculting of help.py to get around
      `textwrap.dedent()` and __doc__ string requirements.
      e10641c4
  19. Oct 12, 2018
  20. Oct 13, 2018
  21. Sep 06, 2018
  22. Oct 10, 2017
    • muxator's avatar
      build: make install in "/doc" failed if the destination dir contained spaces · b584ed1b
      muxator authored
      This and the following commits try to add the necessary quoting in the build
      scripts to make the process more robust.
      
      The target for now is rendering "make deb" successful even when the base
      directory contains spaces (eg. "/opt/mercu rial").
      The build process should succeed without scattering files in spurious
      directories (eg.: "/opt/mercu/usr/bin/hg").
      b584ed1b
  23. May 28, 2017
  24. May 13, 2017
  25. Oct 22, 2016
  26. Oct 07, 2016
  27. May 14, 2016
  28. Jun 20, 2016
    • Katsunori FUJIWARA's avatar
      check-code: detect "missing _() in ui message" more exactly · 844f7288
      Katsunori FUJIWARA authored
      Before this patch, "missing _() in ui message" rule overlooks
      translatable message, which starts with other than alphabet.
      
      To detect "missing _() in ui message" more exactly, this patch
      improves the regexp with assumptions below.
      
        - sequence consisting of below might precede "translatable message"
          in same string token
      
          - formatting string, which starts with '%'
          - escaped character, which starts with 'b' (as replacement of '\\'), or
          - characters other than '%', 'b' and 'x' (as replacement of alphabet)
      
        - any string tokens might precede a string token, which contains
          "translatable message"
      
      This patch builds an input file, which is used to examine "missing _()
      in ui message" detection, before '"$check_code" stringjoin.py' in
      test-contrib-check-code.t, because this reduces amount of change churn
      in subsequent patch.
      
      This patch also applies "()" instead of "_()" on messages below to
      hide false-positives:
      
        - messages for ui.debug() or debug commands/tools
          - contrib/debugshell.py
          - hgext/win32mbcs.py (ui.write() is used, though)
          - mercurial/commands.py
            - _debugchangegroup
            - debugindex
            - debuglocks
            - debugrevlog
            - debugrevspec
            - debugtemplate
      
        - untranslatable messages
          - doc/gendoc.py (ReST specific text)
          - hgext/hgk.py (permission string)
          - hgext/keyword.py (text written into configuration file)
          - mercurial/cmdutil.py (formatting strings for JSON)
      844f7288
  29. May 16, 2016
  30. May 12, 2016
  31. May 07, 2016
    • Sean Farley's avatar
      hg-ssh: copy doc string to man page · 7b52cb38
      Sean Farley authored
      This corrects a warning from lintian that we're shipping an executable without
      a man page. Since there is a doc string in the text, let's use that for the man
      page.
      7b52cb38
  32. Apr 16, 2016
Loading