This instance will be upgraded to Heptapod 0.27.1 on 2021-12-08 at 22:00 UTC+1 (a few minutes of down time)

  1. 09 Apr, 2020 2 commits
    • Pulkit Goyal's avatar
      mergestate: store about files resolved in favour of other · 1b8fd4af3318
      Pulkit Goyal authored
      Committing a merge sometimes wrongly creates a new filenode where it can re-use
      an existing one. This happens because the commit code does it's own calculation
      and does not know what happened on merge.
      This starts storing information in mergestate about files which were
      automatically merged and the other/remote version of file was used.
      We need this information at commit to pick the filenode parent for the new
      This issue was found by Pierre-Yves David and idea to store the relevant parts
      in mergestate is also suggested by him.
      Somethings which can be further investigated are:
      1) refactoring of commit logic more to depend on this information
      2) maybe a more generic solution?
      Differential Revision:
    • Augie Fackler's avatar
      histedit: add test that an invalid editor doesn't bork client state · bca57ad9e630
      Augie Fackler authored
      We had a report of a situation like this borking a user at Google, but
      I can't reproduce it in a test. Let's at least backstop the issue with
      a test, so we don't accidentally introduce such a bug...
      Differential Revision:
  2. 31 Mar, 2020 1 commit
  3. 19 Nov, 2018 1 commit
    • Yuya Nishihara's avatar
      rust-chg: update name of the server process · 80d6e3415636
      Yuya Nishihara authored
      This is a copy of updateprocname() of hgclient.c.
      At this point, rust-chg is basically functional. I did dogfooding for
      a couple of weeks in 2018. There are a few remaining tasks:
       a. loop detection by CHGINTERNALMARK
       b. forward unsupported commands (notably serve -d) to real hg
       c. better handling of early server exception
       d. modernize codebase (2018 edition, impl trait, async/await)
      For (d), we'll probably want to switch to async-std, but I'm thinking of
      upgrading to Tokio 0.2 as an intermediate step since process API isn't
      ported to async-std yet. I'm pretty sure future migration to async-std
      will be painless compared to the mass rewrite from futures-0.1 to 0.3.
      Differential Revision:
  4. 04 Oct, 2018 1 commit
  5. 07 Oct, 2018 4 commits
  6. 02 Apr, 2020 2 commits
  7. 06 Apr, 2020 1 commit
  8. 04 Oct, 2018 2 commits
  9. 07 Oct, 2018 2 commits
  10. 06 Oct, 2018 1 commit
  11. 31 Mar, 2020 1 commit
  12. 03 Nov, 2018 1 commit
  13. 14 Oct, 2018 1 commit
    • Yuya Nishihara's avatar
      rust-chg: add brief comment about initial capacity of temp_sock_path() · c11d98cff883
      Yuya Nishihara authored
      I don't know if it can be expressed as a compile-time constant, so it's
      a comment for now.
      About this series:
      This is quite old patches for rust-chg. I heard from Octobus people that
      there's a plan to do an experiment on merging hgcli + chg + some Rust?,
      so I decided to respin the rust-chg series.
      Maybe we'll rewrite the core to leverage the recent async/await functionality,
      but I want to first make my old patches in so the rust-chg can be a drop-in
      replacement for the chg of C. Compiler warnings will be removed later, and
      the codebase will be upgraded to the 2018 edition later.
      Differential Revision:
  14. 01 Apr, 2020 2 commits
  15. 04 Feb, 2020 1 commit
  16. 02 Apr, 2020 1 commit
  17. 06 Mar, 2020 1 commit
  18. 02 Apr, 2020 3 commits
  19. 01 Apr, 2020 1 commit
  20. 28 Mar, 2020 1 commit
  21. 26 Mar, 2020 2 commits
  22. 29 Mar, 2020 6 commits
    • Gregory Szorc's avatar
      extensions: refactor function for obtaining disabled extension help · 843418dc0b1b
      Gregory Szorc authored
      The way this worked before was hgext.__index__ was consulted.
      This file appears to only be present on some Windows distributions.
      This file contains a dict mapping extension name to its summary line,
      not its full docstring.
      The problem with this is that code in the help system was calling
      this function to resolve help text. If hgext.__index__ was present,
      only the summary line would be displayed. If not, the full extension
      help would be printed.
      This commit changes the function to not use hgext.__index__ such that
      it always returns the full extension help text.
      As a result of this change, test-extension.t and test-qrecord.t
      now pass when run from environments that have an hgext.__index__.
      Differential Revision:
    • Gregory Szorc's avatar
      tests: perform grep manually in · 15aef805619d
      Gregory Szorc authored
      This test has been failing on Windows since 0af56d3ee24c
      introduced the `hg files` invocation. Specifically, Windows seems
      to be choking on special characters in the fileset pattern. I
      believe at least \n and > were causing issues.
      I attempted various incantations to make the Windows command line
      parser accept the fileset but couldn't get anything working.
      I declared bankruptcy and just reimplemented the grepping code
      in Python.
      After this change, the test now passes on Windows again.
      Differential Revision:
    • Gregory Szorc's avatar
      tests: prevent printing \r to stdout · 47e6ec977555
      Gregory Szorc authored
      Like we've done in other recent commits, we need to change
      sys.stdout on Python 3 to not use os.linesep so output is
      consistent on Python 3 on Windows.
      With this change, test-notify.t now passes on Python 3 on Windows!
      Differential Revision:
    • Gregory Szorc's avatar
      tests: force \n newlines when writing to sys.stdout · d359f0d1a3d3
      Gregory Szorc authored
      Without this, Python 3 on Windows inserts some \r that aren't
      present in the input, causing test-http-bad-server.t to fail.
      After this change, the test passes on Python 3 on Windows!
      Differential Revision:
    • Gregory Szorc's avatar
      dispatch: force \n for newlines on sys.std* streams (BC) · 02fa5392bab6
      Gregory Szorc authored
      The sys.std* streams behave differently on Python 3. On Python 3,
      these streams are an io.TextIOWrapper that wraps a binary buffer
      stored on a .buffer attribute. These TextIOWrapper instances
      normalize \n to os.linesep by default. On Windows, this means
      that \n is normalized to \r\n. So functions like print() which
      have an implicit end='\n' will actually emit \r\n for line endings.
      While most parts of Mercurial go through the ui.write() layer to
      print output, some code - notably in extensions and hooks - can use
      print(). If this code was using print() or otherwise writing to
      sys.std* on Windows, Mercurial would emit \r\n.
      In reality, pretty much everything on Windows reacts to \n just fine.
      Mercurial itself doesn't emit \r\n when going through the ui layer.
      Changing the sys.std* streams to not normalize line endings sounds
      like a scary change. But I think it is safe. It also makes Mercurial
      on Python 3 behave similarly to Python 2, which did not perform \r\n
      normalization in print() by default.
      .. bc:: sys.{stdout, stderr, stdin} now use \n line endings on Python 3
      Differential Revision:
    • Gregory Szorc's avatar
      hook: move stdio redirection to context manager · 3cbbfd0bfc17
      Gregory Szorc authored
      The old code was checking stdio redirection in a loop.
      This didn't make sense. The pattern is better expressed
      as a context manager IMO, so this commit refactors it
      to be one.
      Differential Revision:
  23. 28 Mar, 2020 1 commit
    • Gregory Szorc's avatar
      pycompat: change argv conversion semantics · 00e0c5c06ed5
      Gregory Szorc authored
      Use of os.fsencode() to convert Python's sys.argv back to bytes
      was not correct because it isn't the logically inverse operation
      from what CPython was doing under the hood.
      This commit changes the logic for doing the str -> bytes
      conversion. This required a separate implementation for
      POSIX and Windows.
      The Windows behavior is arguably not ideal. The previous
      behavior on Windows was leading to failing tests, such as
      test-http-branchmap.t, which defines a utf-8 branch name
      via a command argument. Previously, Mercurial's argument
      parser looked to be receiving wchar_t bytes in some cases.
      After this commit, behavior on Windows is compatible with
      Python 2, where CPython did not implement `int wmain()` and
      Windows was performing a Unicode to ANSI conversion on the
      wchar_t native command line.
      Arguably better behavior on Windows would be for Mercurial to
      preserve the original Unicode sequence coming from Python and
      to wrap this in a bytes-like type so we can round trip safely.
      But, this would be new, backwards incompatible behavior. My
      goal for this commit was to converge Mercurial behavior on
      Python 3 on Windows to fix busted tests. And I believe I was
      successful, as this commit fixes 9 tests on my Windows
      machine and 14 tests in the AWS CI environment!
      Differential Revision:
  24. 26 Mar, 2020 1 commit
    • Martin von Zweigbergk's avatar
      py3: require values in changelog extras to be bytes · 2141427533d2
      Martin von Zweigbergk authored
      I don't know what happened here because b436059c1cca (py3: use
      pycompat.bytestr() on extra values because it can be int, 2019-02-05)
      came about b44a47214122 (py3: use string for "close" value in commit
      extras, 2018-02-11). Whatever happened, we shouldn't need to convert
      the values to bytes now. It's better to not convert because that might
      cover up bugs where someone sets a unicode value in the extras and
      that works until the unicode value happens to contain non-ascii (at
      which point it will fail because `bytestr()` expects its argument to
      be ascii if it's unicode).
      Differential Revision:
      branch : stable