This instance will be upgraded to Heptapod 0.21.0rc2 on 2021-04-16 at 14:00 UTC+2 (a few minutes of down time)

  1. 22 Oct, 2020 1 commit
  2. 12 Oct, 2020 1 commit
  3. 07 Oct, 2020 1 commit
  4. 08 Nov, 2020 1 commit
    • Martin von Zweigbergk's avatar
      worker: raise exception instead of calling sys.exit() with child's code · 8f07f5a9c3de
      Martin von Zweigbergk authored
      When a worker process returns an error code, we would call
      `sys.exit()` with that exit code on the main process. The `SystemExit`
      exception would then get caught in `scmutil.callcatch()`, which would
      return that error code. The comment there says "Commands shouldn't
      sys.exit directly", which I agree with. This patch changes it so we
      raise a specific exception when a worker fails so we can catch
      instead. I think that means that `SystemExit` is now always an
      internal error.
      (I had earlier thought that this call to `sys.exit()` was from within
      the child process until Matt Harbison made me look again, so thanks
      for that!)
      Differential Revision:
  5. 13 Sep, 2020 1 commit
    • Yuya Nishihara's avatar
      py3: fix formatting of LookupError for workingctx · bd5b2b29b82d
      Yuya Nishihara authored
      Spotted while writing broken tests for "hg grep -fr'wdir()'".
      basectx._fileinfo() raises ManifestLookupError(self._node, ..), but _node
      of the workingctx is None for historical reasons.
      branch : stable
  6. 08 Oct, 2020 1 commit
  7. 07 Oct, 2020 4 commits
  8. 22 Oct, 2020 1 commit
  9. 20 Oct, 2020 1 commit
  10. 14 Jul, 2020 1 commit
  11. 05 Nov, 2019 2 commits
  12. 04 Nov, 2019 1 commit
    • Denis Laxalde's avatar
      py3: add a __str__ method to Abort · 40bf3d7ecc42
      Denis Laxalde authored
      This improves the rendering of some exceptions by avoiding raw
      bytestrings, especially when using --traceback option.
      branch : stable
  13. 08 Nov, 2019 1 commit
    • Augie Fackler's avatar
      cleanup: remove pointless r-prefixes on single-quoted strings · 9f70512ae2cf
      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
      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:
  14. 06 Oct, 2019 2 commits
  15. 03 Sep, 2019 1 commit
  16. 08 Jul, 2018 1 commit
  17. 16 Dec, 2018 1 commit
  18. 14 Dec, 2018 1 commit
  19. 16 Apr, 2017 1 commit
  20. 14 Apr, 2017 1 commit
    • Gregory Szorc's avatar
      httppeer: wrap globally · bf855efe5664
      Gregory Szorc authored
      There were a handful of places in the code where
      was called with no explicit error handling or with inconsistent
      error handling. In order to eliminate this class of bug, we globally
      swap out with a unified error handler.
      I initially attempted to fix all call sites. However, after
      going down that rabbit hole, I figured it was best to just change
      read() to do what we want. This appears to be a worthwhile
      change, as the tests demonstrate many of our uncaught exceptions
      go away.
      To better represent this class of failure, we introduce a new
      error type. The main benefit over IOError is it can hold a hint.
      I'm receptive to tweaking its name or inheritance.
  21. 11 Apr, 2017 1 commit
  22. 18 Sep, 2018 2 commits
    • Gregory Szorc's avatar
      global: replace most uses of RevlogError with StorageError (API) · b63dee7bd0d9
      Gregory Szorc authored
      When catching errors in storage, we should be catching
      StorageError instead of RevlogError. When throwing errors related
      to storage, we shouldn't be using RevlogError unless we know
      the error stemmed from revlogs. And we only reliably know that
      if we're in or are inheriting from a type defined in
      Differential Revision:
    • Gregory Szorc's avatar
      error: introduce StorageError · cb65d4b7e429
      Gregory Szorc authored
      Errors in revlogs are often represented by RevlogError. It's fine
      for revlogs to raise a revlog-specific exception. But in the context
      of multiple storage backends, it doesn't make sense to be throwing or
      catching an exception with "revlog" in its name when revlogs may not
      even be in play.
      This commit introduces a new generic StorageError type for representing
      errors in the storage layer.
      RevlogError is an instance of this type.
      Interface documentation and tests referencing RevlogError has been
      updated to specify StorageError should be used.
      .. api::
         ``error.StorageError`` has been introduced to represent errors in
         storage. It should be used in place of ``error.RevlogError`` unless
         the error is known to come from a revlog.
      Differential Revision:
  23. 13 Sep, 2018 1 commit
  24. 12 Sep, 2018 1 commit
  25. 05 Sep, 2018 1 commit
    • Gregory Szorc's avatar
      wireprotov2: implement commands as a generator of objects · 07b58266bce3
      Gregory Szorc authored
      Previously, wire protocol version 2 inherited version 1's model of
      having separate types to represent the results of different wire
      protocol commands.
      As I implemented more powerful commands in future commits, I found
      I was using a common pattern of returning a special type to hold a
      generator. This meant the command function required a closure to
      do most of the work. That made logic flow more difficult to follow.
      I also noticed that many commands were effectively a sequence of
      objects to be CBOR encoded.
      I think it makes sense to define version 2 commands as generators.
      This way, commands can simply emit the data structures they wish to
      send to the client. This eliminates the need for a closure in
      command functions and removes encoding from the bodies of commands.
      As part of this commit, the handling of response objects has been
      moved into the serverreactor class. This puts the reactor in the
      driver's seat with regards to CBOR encoding and error handling.
      Having error handling in the function that emits frames is
      particularly important because exceptions in that function can lead
      to things getting in a bad state: I'm fairly certain that uncaught
      exceptions in the frame generator were causing deadlocks.
      I also introduced a dedicated error type for explicit error reporting
      in command handlers. This will be used in subsequent commits.
      There's still a bit of work to be done here, especially around
      formalizing the error handling "protocol." I've added yet another
      TODO to track this so we don't forget.
      Test output changed because we're using generators and no longer know
      we are at the end of the data until we hit the end of the generator.
      This means we can't emit the end-of-stream flag until we've exhausted
      the generator. Hence the introduction of 0-sized end-of-stream frames.
      Differential Revision:
  26. 14 Apr, 2018 1 commit
  27. 16 Nov, 2017 1 commit
  28. 13 Jul, 2016 1 commit
  29. 11 Jul, 2016 1 commit
  30. 09 Jul, 2016 1 commit
    • Yuya Nishihara's avatar
      error: make HintException a mix-in class not derived from BaseException (API) · 945b4c14c570
      Yuya Nishihara authored
      HintException is unrelated to the hierarchy of errors. It is an implementation
      detail whether a class inherits from HintException or not, a sort of "private
      inheritance" in C++.
      New Hint isn't an exception class, which prevents catching error by its type:
          except error.Hint:
      Unfortunately, this passes on PyPy 5.3.1, but not on Python 2, and raises more
      detailed TypeError on Python 3.
  31. 01 Mar, 2018 1 commit
  32. 23 Dec, 2015 3 commits