Skip to content
Snippets Groups Projects
  1. Mar 04, 2021
  2. Jan 30, 2021
  3. Mar 01, 2021
  4. Feb 25, 2021
  5. Feb 05, 2021
    • Kyle Lippincott's avatar
      debian: support a "chg-first" installation mechanism (hg is actually chg) · 90481550
      Kyle Lippincott authored
      This mechanism builds chg such that it looks for `hg` to be available at
      /usr/lib/mercurial/hg instead of in the $PATH as `hg`, and makes the `hg` in
      /usr/bin be a symlink to `chg`.
      
      It's important to note that the hg binary must continue to be named `hg`. If we
      wanted to instead place it at /usr/bin/pyhg or something similar, we would need
      to modify Mercurial to allow that basename. Failure to do so would break
      Mercurial's shell aliases that use `hg`, `chg`, or `$HG`.
      
      I don't know if we should ever have a setup like this be the default setup, but
      I'm willing to get more information on our experience with it for making such a
      determination. Actually making it the default might be rather involved, as we
      don't maintain the official debian packaging rules.
      
      Differential Revision: https://phab.mercurial-scm.org/D10020
      90481550
  6. Mar 03, 2021
  7. Feb 18, 2021
  8. Feb 19, 2021
  9. Jan 29, 2021
  10. Mar 01, 2021
  11. Jan 29, 2021
  12. Feb 25, 2021
  13. Jan 11, 2021
  14. Jan 08, 2021
  15. Feb 24, 2021
  16. Feb 26, 2021
    • Simon Sapin's avatar
      rhg: Use clap’s support for global CLI arguments · 4e4c7040
      Simon Sapin authored
      By default, clap only accepts app-level arguments (as opposed to sub-command
      level) to be specified before a sub-command: `rhg -R ./foo log`. Specifying
      them after would be rejected: `rhg log -R ./foo`.
      
      Previously we worked around that by registering global arguments both
      at the app level and on each sub-command, but that required looking
      for their value in two places. It turns out that Clap has built-in support
      for what we want to do, so let’s use it.
      
      Also, Clap "settings" turn out to be either global or not too.
      Let’s make `AllowInvalidUtf8` apply to sub-commands too.
      
      Differential Revision: https://phab.mercurial-scm.org/D10080
      4e4c7040
  17. Feb 04, 2021
    • Kyle Lippincott's avatar
      revlog: add a mechanism to verify expected file position before appending · e9901d01
      Kyle Lippincott authored
      If someone uses `hg debuglocks`, or some non-hg process writes to the .hg
      directory without respecting the locks, or if the repo's on a networked
      filesystem, it's possible for the revlog code to write out corrupted data.
      
      The form of this corruption can vary depending on what data was written and how
      that happened. We are in the "networked filesystem" case (though I've had users
      also do this to themselves with the "`hg debuglocks`" scenario), and most often
      see this with the changelog. What ends up happening is we produce two items
      (let's call them rev1 and rev2) in the .i file that have the same linkrev,
      baserev, and offset into the .d file, while the data in the .d file is appended
      properly. rev2's compressed_size is accurate for rev2, but when we go to
      decompress the data in the .d file, we use the offset that's recorded in the
      index file, which is the same as rev1, and attempt to decompress
      rev2.compressed_size bytes of rev1's data. This usually does not succeed. :)
      
      When using inline data, this also fails, though I haven't investigated why too
      closely. This shows up as a "patch decode" error. I believe what's happening
      there is that we're basically ignoring the offset field, getting the data
      properly, but since baserev != rev, it thinks this is a delta based on rev
      (instead of a full text) and can't actually apply it as such.
      
      For now, I'm going to make this an optional component and default it to entirely
      off. I may increase the default severity of this in the future, once I've
      enabled it for my users and we gain more experience with it. Luckily, most of my
      users have a versioned filesystem and can roll back to before the corruption has
      been written, it's just a hassle to do so and not everyone knows how (so it's a
      support burden). Users on other filesystems will not have that luxury, and this
      can cause them to have a corrupted repository that they are unlikely to know how
      to resolve, and they'll see this as a data-loss event. Refusing to create the
      corruption is a much better user experience.
      
      This mechanism is not perfect. There may be false-negatives (racy writes that
      are not detected). There should not be any false-positives (non-racy writes that
      are detected as such). This is not a mechanism that makes putting a repo on a
      networked filesystem "safe" or "supported", just *less* likely to cause
      corruption.
      
      Differential Revision: https://phab.mercurial-scm.org/D9952
      e9901d01
  18. Feb 24, 2021
  19. Feb 04, 2021
  20. Feb 17, 2021
  21. Feb 16, 2021
  22. Feb 17, 2021
    • Simon Sapin's avatar
      blackbox: Remove misleading quotes in config example · 36f3a648
      Simon Sapin authored
      This example previously looked like quotes were part of configuration file
      syntax, and the parsed `date-format` value was the part inside of them.
      This is not the case: config syntax only parses quotes in list values.
      Instead using that config would result in literal quotes being written to
      `.hg/blackbox.log` as part of the date format.
      
      This changes the example to what was probably intended.
      
      Differential Revision: https://phab.mercurial-scm.org/D10011
      36f3a648
  23. Feb 11, 2021
  24. Feb 16, 2021
  25. Feb 17, 2021
Loading