Skip to content
Snippets Groups Projects
  1. Oct 12, 2021
    • 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
  2. Oct 11, 2021
  3. Oct 12, 2021
  4. Oct 11, 2021
  5. Oct 12, 2021
  6. Oct 08, 2021
    • 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
  7. Oct 11, 2021
  8. Sep 08, 2021
  9. Mar 02, 2021
  10. Oct 08, 2021
    • 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
  11. Oct 11, 2021
  12. Oct 08, 2021
  13. Oct 04, 2021
  14. Sep 19, 2021
  15. Sep 02, 2021
    • 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
  16. Jun 25, 2021
  17. Oct 05, 2021
  18. Oct 06, 2021
  19. Oct 05, 2021
  20. Jun 24, 2021
  21. Jul 18, 2021
  22. Oct 07, 2021
  23. Oct 05, 2021
  24. Oct 01, 2021
Loading