Read about our upcoming Code of Conduct on this issue

  1. 12 Oct, 2021 8 commits
  2. 13 Oct, 2021 1 commit
  3. 12 Oct, 2021 2 commits
  4. 03 Oct, 2021 1 commit
  5. 12 Oct, 2021 1 commit
    • Simon Sapin's avatar
      dirstate-v2: Replace the 32-bit `mode` field with two bits · 4d5a13253d34
      Simon Sapin authored
      Previously we stored the entire value from `stat_result.st_mode`,
      like dirstate-v1 does. However only the executable permission
      and type of file (only symbolic links and normal files are supported)
      are relevant to Mecurial.
      
      So replace this field with two bits in the existing bitfield byte.
      For now the unused space is left as padding, as it will be used
      for something else soon.
      
      Differential Revision: https://phab.mercurial-scm.org/D11635
      4d5a13253d34
  6. 11 Oct, 2021 1 commit
  7. 12 Oct, 2021 2 commits
  8. 11 Oct, 2021 1 commit
  9. 12 Oct, 2021 1 commit
  10. 08 Oct, 2021 1 commit
    • Simon Sapin's avatar
      dirstate-v2: Swap the order of size and mtime on disk · 6e01bcd111d2
      Simon Sapin authored
      This makes the dirstate-v2 file format match dirstate-v1 for the order of
      `mode`, `size`, and `mtime`. This order does not matter as long as these
      components are handled through named fields/attributes in code, but in a few
      places we still have tuples so having the same order everywhere might help
      avoid a bug that might not be obvious since those components have the same type.
      
      Differential Revision: https://phab.mercurial-scm.org/D11620
      6e01bcd111d2
  11. 11 Oct, 2021 1 commit
  12. 08 Sep, 2021 1 commit
  13. 02 Mar, 2021 1 commit
  14. 08 Oct, 2021 2 commits
    • Martin von Zweigbergk's avatar
      dispatch: ignore failure to flush ui · 2f2107c01dee
      Martin von Zweigbergk authored
      When the pager dies, we get a `SIGPIPE`. That causes
      `error.SignalInterrupt` to be raised ` (from `ui._catchterm()`). Any
      further writes or flushes will cause further `SIGPIPE`s and furhter
      `error.SignalInterrupt`. If we write or flush outside of the
      try/except that handle `KeyboardInterrupt` (which
      `error.SignalInterrupt` is a subclass of), then control will escape
      from the `dispatch` module. Let's fix that by ignoring errors from
      flushing the ui.
      
      I would have rather fixed this by restoring the stdout and stderr
      streams when the pager dies, but it gets complicated because of
      multiple ui instances (ui/lui) and different pager setups between
      regular hg and chg.
      
      This changes a test in `test-pager.t`, but I don't understand why. I
      would have thought that all the output from the command should have
      gone to the broken pager.
      
      Differential Revision: https://phab.mercurial-scm.org/D11627
      2f2107c01dee
    • Martin von Zweigbergk's avatar
      dispatch: don't change error status if flushing stdio fails · 8fae2cc6ee86
      Martin von Zweigbergk authored
      If we already have a non-zero exit code, I don't think we should
      change it to 255 because we fail to flush stdio. This may not matter
      yet, but it will matter when I make a killed pager result in exit code
      250 (it's currently 255).
      
      Differential Revision: https://phab.mercurial-scm.org/D11626
      8fae2cc6ee86
  15. 11 Oct, 2021 1 commit
  16. 08 Oct, 2021 1 commit
  17. 04 Oct, 2021 1 commit
  18. 19 Sep, 2021 2 commits
  19. 02 Sep, 2021 2 commits
    • Danny Hooper's avatar
      fix: reduce number of tool executions · f12a19d03d2c
      Danny Hooper authored
      By grouping together (path, ctx) pairs according to the inputs they would
      provide to fixer tools, we can deduplicate executions of fixer tools to
      significantly reduce the amount of time spent running slow tools.
      
      This change does not handle clean files in the working copy, which could still
      be deduplicated against the files in the checked out commit. It's a little
      harder to do that because the filerev is not available in the workingfilectx
      (and it doesn't exist for added files).
      
      Anecdotally, this change makes some real uses cases at Google 10x faster. I
      think we were originally hesitant to do this because the benefits weren't
      obvious, and implementing it efficiently is kind of tricky. If we simply
      memoized the formatter execution function, we would be keeping tons of file
      content in memory.
      
      Also included is a regression test for a corner case that I broke with my first
      attempt at optimizing this code.
      
      Differential Revision: https://phab.mercurial-scm.org/D11280
      f12a19d03d2c
    • Danny Hooper's avatar
      fix: add test to demonstrate how many times tools are executed · 066cdec8f74f
      Danny Hooper authored
      The current implementation wastes a lot of effort invoking fixer tools more
      than once on the same file name+content. It is good to track changes in this
      behavior.
      
      Differential Revision: https://phab.mercurial-scm.org/D11279
      066cdec8f74f
  20. 25 Jun, 2021 1 commit
  21. 05 Oct, 2021 2 commits
  22. 06 Oct, 2021 1 commit
  23. 05 Oct, 2021 1 commit
  24. 24 Jun, 2021 1 commit
  25. 18 Jul, 2021 3 commits