Skip to content
Snippets Groups Projects
  1. May 20, 2016
    • Katsunori FUJIWARA's avatar
      tests: escape bytes setting MSB in input of grep for portability · 8c5e880c
      Katsunori FUJIWARA authored
      GNU grep (2.21-2 or later) assumes that input is encoded in LC_CTYPE,
      and input is binary if it contains byte sequence not valid for that
      encoding.
      
      For example, if locale is configured as C, a byte setting most
      significant bit (MSB) makes such GNU grep show "Binary file <FILENAME>
      matches" message instead of matched lines unintentionally.
      
      This behavior is recognized as a bug, and fixed in GNU grep 2.25-1 or
      later. But some distributions are shipped with such buggy version
      (e.g. Ubuntu xenial, which is used by launchpad buildbot).
      
          http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19230
          https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800670
          http://packages.ubuntu.com/xenial/grep
      
      This causes failure of test-commit-interactive.t, which applies grep
      on CP932 byte sequence since 1111e84de635.
      
      But, explicit setting LC_CTYPE for CP932 might cause another problem,
      because it can't be assumed that all environment running Mercurial
      tests allows arbitrary locale setting.
      
      To resolve this issue, this patch escapes bytes setting MSB in input
      of grep.
      
      For this purpose:
      
        - str.encode('string-escape') isn't useful, because it escapes also
          control code (less than 0x20), and makes EOL handling complicated
      
        - "f --hexdump" isn't useful, because it isn't line-oriented
      
        - "sed -n" seems reasonable, but "sed" itself sometimes causes
          portability issue, too (e.g. 900767dfa80d or afb86ee925bf)
      
      This patch is posted with "stable" flag, because 1111e84de635 is on
      stable branch.
      8c5e880c
  2. May 16, 2016
  3. May 12, 2016
    • Katsunori FUJIWARA's avatar
      help: search section of help topic by translated section name correctly · aaabed77
      Katsunori FUJIWARA authored
      Before this patch, "hg help topic.section" might show unexpected
      section of help topic in some encoding.
      
      It applies str.lower() instead of encoding.lower(str) on translated
      message to search section case-insensitively, but some encoding uses
      0x41(A) - 0x5a(Z) as the second or later byte of multi-byte character
      (for example, ja_JP.cp932), and str.lower() causes unexpected result.
      
      To search section of help topic by translated section name correctly,
      this patch replaces str.lower() by encoding.lower(str) for both query
      string (in commands.help()) and translated help text (in
      minirst.getsections()).
    • Katsunori FUJIWARA's avatar
      patch: show lower-ed translated message correctly · 9d38a206
      Katsunori FUJIWARA authored
      Before this patch, patch.filterpatch() shows meaningless translation
      of help message for chunk selection in some encoding.
      
      It applies str.lower() instead of encoding.lower(str) on translated
      message, but some encoding uses 0x41(A) - 0x5a(Z) as the second or
      later byte of multi-byte character (for example, ja_JP.cp932), and
      str.lower() causes unexpected result.
      
      To show lower-ed translated message correctly, this patch replaces
      str.lower() by encoding.lower(str).
      9d38a206
  4. May 09, 2016
  5. May 06, 2016
  6. May 01, 2016
  7. 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
  8. May 06, 2016
    • Matt Mackall's avatar
      progress: stop excessive clearing (issue4801) · 222b8170
      Matt Mackall authored
      The progress bar was being cleared on every write(), regardless of
      whether it was currently displayed. This could foul up the display of
      any writes that didn't include a linebreak.
      
      In particular, the win32 mode of the color extension was turning
      single prompt string writes into two writes, and the resulting
      clear/write/clear/write pattern was making the prompt invisible.
      
      We fix this by insisting that we have shown a progress bar and haven't
      just cleared it (setting lastprint to 0).
      
      Conveniently, the test suite already had instances of duplicate
      clears.. that are now cleared up.
      222b8170
  9. May 05, 2016
  10. May 01, 2016
  11. Apr 07, 2016
  12. May 01, 2016
  13. Apr 30, 2016
    • Sean Farley's avatar
      builddeb: use codename in version · 52f71214
      Sean Farley authored
      Apparently, this is needed to allow ppas to be built for multiple distros.
      52f71214
    • Pierre-Yves David's avatar
      rebase: restrict rebase destination to the pulled set (issue5214) · 261c2537
      Pierre-Yves David authored
      Before this patch, `hg pull --rebase` would be a strict sequence of `hg pull`
      followed by `hg rebase` if anything was pulled.
      
      Now that rebase pick his default destination the same way than merge, than
      `hg rebase` step would abort in the case the repo already had multiple anonymous
      heads (because of the ambiguity). (changed in fac3a24be50e)
      
      The intend of the user with `hg pull --rebase` is clearly to rebase on pulled
      content. This used to be (mostly) enforced by the former default destination for
      rebase, "tipmost changeset of the branch" as the tipmost would likely a
      changeset that just got pulled. But this intended was no longer enforced with
      the new defaul destination (unified with merge).
      
      This changeset makes use of the '_destspace' mechanism introduced in the previous
      changeset to enforce this.
      
      This partially fixes issue5214 as no change at all have been made to the new
      handling of the case with bookmark (unified with merge).
      261c2537
    • Pierre-Yves David's avatar
      destutil: add the ability to specify a search space for rebase destination · cf7de4ae
      Pierre-Yves David authored
      In the 'hg pull --rebase', we don't want to pick a rebase destination unrelated
      to the pull, we lay down basic infrastructure to allow such restriction on
      stable (before 3.8 release) in this case. See issue 5214 for details.
      
      Actual usage and test will be in the next patch.
      cf7de4ae
    • Gregory Szorc's avatar
      sslutil: restore old behavior not requiring a hostname argument (issue5210) · 693b856a
      Gregory Szorc authored
      This effectively backs out changeset 1fde84d42f9c.
      
      The http library behind ui.http2=true isn't specifying the hostname.
      It is the day before the expected 3.8 release and we don't want to ship
      a regression.
      
      I'll try to restore this requirement in the 3.9 release cycle as part
      of planned improvements to Mercurial's SSL/TLS interactions.
      693b856a
  14. Apr 28, 2016
    • Matt Mackall's avatar
      tests: test a variety of cache invariants · b962ae0a
      Matt Mackall authored
      We've historically had a problem maintaining the expected invariants
      on our caches, especially when introducing new caches. This tests
      documents the invariants and exercises them across most of our
      existing cache files.
      b962ae0a
    • Matt Mackall's avatar
      repoview: ignore unwritable hidden cache · a4dc5fe7
      Matt Mackall authored
      The atomictemp.close() file attempts to do a rename, which can fail.
      Moving the close inside the exception handler fixes it.
      
      This doesn't fit well with the with: pattern, as it's the finalizer
      that's failing.
      a4dc5fe7
    • Matt Mackall's avatar
      tags: silence hgtagsfnodes reading failures · e3055b46
      Matt Mackall authored
      tryread() doesn't handle "is a directory" errors and presumably
      others. We might not want to globally swallow such tryread errors, so
      we replace with our own try/except handling.
      
      An upcoming test will use directories as a portable stand-in for
      various bizarre circumstances that cache read/write code should be
      robust to.
      e3055b46
    • Matt Mackall's avatar
      tags: silence cache parsing errors · a9dd92c4
      Matt Mackall authored
      Follow our standard STFU cache-handling pattern
      a9dd92c4
  15. May 01, 2016
  16. Apr 27, 2016
  17. Apr 28, 2016
    • Adam Simpkins's avatar
      graft: fix printing of --continue command · 224dd889
      Adam Simpkins authored
      Properly shell quote arguments, to avoid printing commands that won't work when
      run literally.  For example, a date string with timestamp needs to be quoted:
      --date '1456953053 28800'
      224dd889
Loading