Skip to content
Snippets Groups Projects
  1. Jul 06, 2020
    • Pierre-Yves David's avatar
      commitctx: move a tiny else clause above the very long one · 55464c0b3a89
      Pierre-Yves David authored
      This is simple to have all the simple case unfold before the 100+ line one. Otherwise it is hard to relate the `else` to the initial conditionnal.
      
      This is part of a larger refactoring/cleanup of the commitctx code to clarify
      and augment the logic gathering metadata useful for copy tracing. The current
      code is a tad too long and entangled to make such update easy. We start with
      easy and small cleanup.
      
      Differential Revision: https://phab.mercurial-scm.org/D8708
      55464c0b3a89
    • Pierre-Yves David's avatar
      commitctx: consider removed as touched · c068e355cd71
      Pierre-Yves David authored
      This achieve the same result with clearer code.
      
      This is part of a larger refactoring/cleanup of the commitctx code to clarify
      and augment the logic gathering metadata useful for copy tracing. The current
      code is a tad too long and entangled to make such update easy. We start with
      easy and small cleanup.
      
      Differential Revision: https://phab.mercurial-scm.org/D8707
      c068e355cd71
    • Pierre-Yves David's avatar
      commitctx: rename "changed" to touched · 025ee25b5b23
      Pierre-Yves David authored
      The variable contains content that are both added and modified. "changed" could
      be confused with "modified" only, so we pick a less ambiguous naming that will
      help with more unification.
      
      For example, it would make sense to shove the "removed" item in there since
      this is how the variable is used.
      
      This is part of a larger refactoring/cleanup of the commitctx code to clarify
      and augment the logic gathering metadata useful for copy tracing. The current
      code is a tad too long and entangled to make such update easy. We start with
      easy and small cleanup.
      
      Differential Revision: https://phab.mercurial-scm.org/D8706
      025ee25b5b23
  2. Jul 07, 2020
  3. Jul 06, 2020
    • Pierre-Yves David's avatar
      commitctx: compute files added from _filecommit returns · e64c35dfc6cb
      Pierre-Yves David authored
      When possible, lets avoid recomputing the same information again.
      
      This is part of a larger refactoring/cleanup of the commitctx code to clarify
      and augment the logic gathering metadata useful for copy tracing. The current
      code is a tad too long and entangled to make such update easy. We start with
      easy and small cleanup.
      
      Differential Revision: https://phab.mercurial-scm.org/D8703
      e64c35dfc6cb
    • Pierre-Yves David's avatar
      commitctx: return "touched" status from _filecommit · 509f5b6c0b7e
      Pierre-Yves David authored
      Instead of mutating a list passed in argument, we simply return the information
      from the `_filecommit` function. This make for a cleaner API and allow for
      richer information to be returned. That richer information will be used in the
      next commit to avoid duplicated computation.
      
      This is part of a larger refactoring/cleanup of the commitctx code to clarify
      and augment the logic gathering metadata useful for copy tracing. The current
      code is a tad too long and entangled to make such update easy. We start with
      easy and small cleanup.
      
      Differential Revision: https://phab.mercurial-scm.org/D8702
      509f5b6c0b7e
  4. Jul 18, 2020
  5. Jul 19, 2020
  6. Jul 20, 2020
  7. Jul 14, 2020
  8. Jul 17, 2020
  9. Jul 18, 2020
  10. Jul 14, 2020
  11. Jul 09, 2020
  12. Jul 18, 2020
    • Manuel Jacob's avatar
      windows: don’t set `softspace` attribute in `winstdout` · ed58ecd59030
      Manuel Jacob authored
      Python 2 file objects have the `softspace` attribute
      (https://docs.python.org/2/library/stdtypes.html#file.softspace), which is used
      by the print statement to track its internal state. The documentation demands
      from file-like objects only that the attribute is writable and initialized to
      0. Method `file.write()` sets it to 0, but this is not documented.
      Historically, sys.stdout was replaced by an instance of the `winstdout` class,
      so it needed to behave exactly the same (the softspace fix was introduced in
      705278e70457). Nowadays we don’t replace sys.stdout and don’t use the print
      statement on `winstdout` instances, so we can safely drop it.
      ed58ecd59030
  13. Jul 17, 2020
  14. Jul 16, 2020
  15. Jul 14, 2020
  16. Jul 13, 2020
  17. Apr 01, 2020
  18. Jul 17, 2020
    • Manuel Jacob's avatar
      windows: always work around EINVAL in case of broken pipe for stdout / stderr · a37f290a7124
      Manuel Jacob authored
      In 29a905fe23ae, I missed the fact that the `winstdout` class works around two
      unrelated bugs (size limit when writing to consoles and EINVAL in case of
      broken pipe) and that the latter bug happens even when no console is involved.
      When writing a test for this, I realized that the same problem applies to
      stderr, so I applied the workaround for EINVAL to both stdout and stderr.
      
      The size limit is worked around in the same case as before (consoles on Windows
      on Python 2). For that, I changed the `winstdout` class.
      a37f290a7124
  19. Jul 16, 2020
Loading