Skip to content
Snippets Groups Projects
  1. Sep 14, 2019
  2. Sep 11, 2019
  3. Sep 13, 2019
  4. Sep 10, 2019
  5. Sep 09, 2019
  6. Sep 10, 2019
  7. Sep 11, 2019
  8. Sep 09, 2019
    • Connor Sheehan's avatar
      hgweb: fix websub regex flag syntax on Python 3 · 6ccf539a
      Connor Sheehan authored
      The `websub` config section for hgweb is broken under Python 3
      when using regex flags syntax (ie the optional `i` in the example
      from `hg help config.websub`:
      
          patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
      
      Flags are pulled out of the specified byte-string using a regular
      expression, and uppercased. The flags are then iterated over and
      passed to the `re` module using `re.__dict__[item]`, to get the
      object attribute of the same name from the `re` module. So on Python
      2 if the `il` flags are passed, this transition looks like:
      
          `'il'` -> `'IL'` -> `'I'` -> `re.__dict__['I']` -> `re.I`
      
      However on Python 3, these are bytes objects. When we iterate over
      a bytes object in Python 3, instead of getting the individual characters
      in the string as string objects of length one, we get the integer \
      value corresponding to that byte. So the same transition looks like:
      
          `b'il'` -> `b'IL'` -> `73` -> `re.__dict__[73]` -> `KeyError`
      
      This commit fixes the type mismatch by converting the bytes to a
      system string before iterating over each element to pass to `re`.
      The transition will now look like:
      
          `b'il'` -> `u'IL'` -> `u'I'` -> `re.__dict__[u'I']` -> `re.I`
      
      In addition we expand `test-websub.t` to cover the regex flag case
      (for both the `websub` section and `interhg`).
      
      Differential Revision: https://phab.mercurial-scm.org/D6788
      6ccf539a
    • Augie Fackler's avatar
      merge with stable · f059d6ff
      Augie Fackler authored
      f059d6ff
  9. Sep 07, 2019
  10. Sep 09, 2019
  11. Sep 07, 2019
  12. Dec 17, 2018
  13. Sep 06, 2019
  14. Aug 15, 2019
  15. Sep 07, 2019
  16. Sep 08, 2019
    • Matt Harbison's avatar
      uncommit: add options to update to the current user or current date · 66048f6b
      Matt Harbison authored
      These are also from the evolve extension's version of uncommit.
      
      I tried adding validation that both forms of user or date can't be specified at
      the same time, but that fails because these show up in `opts` with a None value
      whether or not the option was given on the command line.  Presumably that means
      the conditional in `resolvecommitoptions` could be simplified.  But this is how
      both evolve and MQ handle it.
      
      Differential Revision: https://phab.mercurial-scm.org/D6828
      66048f6b
  17. Sep 07, 2019
  18. Jun 14, 2019
  19. Sep 08, 2019
    • Pierre-Yves David's avatar
      run-tests: extract a `process_cmd_line` from the main function · fc8072f3
      Pierre-Yves David authored
      The main function doing line comparison is quite complex. Slicing it in smaller
      piece should clarify it.
      
      (This is a gratuitous cleanup that I made while investigating a bug).
      fc8072f3
    • Pierre-Yves David's avatar
      changegroup: move message about added changes to transaction summary · d7304434
      Pierre-Yves David authored
      Before that, applying multiple changegroups in the same transaction issued the
      message multiple time. This result in a confusing output:
      
          adding changesets
          adding manifests
          adding file changes
          added 32768 changesets with 60829 changes to 2668 files
          adding changesets
          adding manifests
          adding file changes
          added 8192 changesets with 16885 changes to 1553 files
          adding changesets
          adding manifests
          adding file changes
          added 1020 changesets with 1799 changes to 536 files
          adding changesets
          adding manifests
          ...
      
      Instead, we now only issue the message once at the end of the transaction,
      summing up all added changesets, changes and files. The line is identical, but
      happens sightly later in the output.
      
      There are other suboptimal behavior around issue multiple changegroup (eg:
      progress bar). We'll cover them later.
      
      This impact of lot of test as one would expect, but a two pass check show they
      are just the order change we expected.
      
      To deal with "under the hood" bundle application by internal code, we had to
      take a slightly hacky move. We could clean that up with a more official way to
      enter "under the hood" section, however I want to keep this series simple to get
      it landed. This kind of change have a very high bit rot rate since it impact a
      lot of test output.
      d7304434
  20. Sep 07, 2019
  21. Oct 14, 2018
    • Pierre-Yves David's avatar
      transaction: issue "new obsmarkers" message at the end of the transaction · 38392d5b
      Pierre-Yves David authored
      Instead of making bundle2 code responsible for this, it seems better to have it
      handled and the transaction level. First, it means the message will be more
      consistently printed. Second it means we won't spam the message over and over if
      the data arrive in multiple piece. Third, we are planning to move other similar
      message at the same level (for the same reason) so having them all at the same
      location will help us to control the order they are displayed.
      38392d5b
    • Pierre-Yves David's avatar
      debugobsolete: also issue the "new obsmarkers" messsage · 34a46d48
      Pierre-Yves David authored
      We are going to improve the way this message is issued in the core codebase.
      This will make it appears for `hg debugobsolete` too. Since this seems like a
      good idea, we make the output change in a previous changesets to clarify the
      next changeset.
      34a46d48
Loading