Skip to content
Snippets Groups Projects
  1. Nov 11, 2018
  2. Nov 14, 2018
    • Kyle Lippincott's avatar
      shelve: use matcher to restrict prefetch to just the modified files · 29e4a77b
      Kyle Lippincott authored
      Shelve currently operates by:
      - make a temp commit
      - identify all the bases necessary to shelve, put them in the bundle
      - use exportfile to export the temp commit to the bundle ('file' here means
        "export to this fd", not "export this file")
      - remove the temp commit
      
      exportfile calls prefetchfiles, and prefetchfiles uses a matcher to restrict
      what files it's going to prefetch; if it's not provided, it's alwaysmatcher.
      This means that `hg shelve` in a remotefilelog repo can possibly download the
      file contents of everything in the repository, even when it doesn't need to. It
      luckily is restricted to the narrowspec (if there is one), but this is still a
      lot of downloading that's just unnecessary, especially if there's a "smart"
      VCS-aware filesystem involved.
      
      exportfile is called with exactly one revision to emit, so we're just
      restricting it to prefetching the files from that revision. The base revisions
      having separate files should not be a concern since they're handled already;
      example:
      
      commit 10 is draft and modifies foo/a.txt and foo/b.txt
      commit 11 is draft and modifies foo/a.txt
      my working directory that I'm shelving modifies foo/b.txt
      
      By the time we get to exportfile, commit 10 and 11 are already handled, so the
      matcher only specifying foo/b.txt does not cause any problems. I verified this
      by doing an `hg unbundle` on the bundle that shelve produces, and getting the
      full contents of those commits back out, instead of just the files that were
      modified in the shelve.
      
      Differential Revision: https://phab.mercurial-scm.org/D5268
      29e4a77b
  3. Nov 11, 2018
    • Yuya Nishihara's avatar
      logtoprocess: drop support for ui.log() call with invalid msg arguments (BC) · d2c997b8
      Yuya Nishihara authored
      Before, the logtoprocess extension put a formatted message into $MSG1, and
      its arguments to $MSG2... If the specified arguments couldn't be formatted
      because of a caller bug, an unformatted message was passed in to $MSG1
      instead of exploding. This behavior doesn't make sense.
      
      Since I'm planning to formalize the ui.log() interface such that we'll no
      longer have to extend the ui class, I want to remove any features not
      conforming to the ui.log() API. So this patch removes the support for
      ill-formed arguments, and $MSG{n} (where n > 1) parameters which seems
      useless as long as the message can be formatted. The $MSG1 variable isn't
      renamed for the maximum compatibility.
      
      In future patches, a formatted msg will be passed to a processlogger object,
      instead of overriding the ui.log() function.
      
      .. bc::
      
         The logtoprocess extension no longer supports invalid ``ui.log()``
         arguments. A log message is always formatted and passed in to the
         ``$MSG1`` environment variable.
      d2c997b8
    • Yuya Nishihara's avatar
    • Yuya Nishihara's avatar
      logtoprocess: leverage procutil.shellenviron() to stringify variables (BC) · fbac323e
      Yuya Nishihara authored
      This should make the extension more Py3 friendly. The environment variables
      of the main process are copied to the dict by shellenviron().
      
      .. bc::
      
         Boolean options passed to the logtoprocess extension are now formatted
         as ``0`` or ``1`` instead of ``None``, ``False``, or ``True``.
      fbac323e
  4. Nov 13, 2018
  5. Oct 17, 2018
    • Augie Fackler's avatar
      histedit: import chistedit curses UI from hg-experimental · c3617545
      Augie Fackler authored
      I don't tend to like curses interfaces, but this gets enough use at
      work that it seems like it's worth bringing into core. This is a
      minimal import from hg-experimental revision 4c7f33bf5f00, in that
      I've done the smallest amount of code movement and editing in order to
      import the functionality.
      
      .. feature::
      
          `hg histedit` will now present a curses UI if curses is available
          and `ui.interface` or `ui.interface.histedit` is set to `curses`.
      
      Differential Revision: https://phab.mercurial-scm.org/D5146
      c3617545
  6. Nov 09, 2018
  7. Nov 08, 2018
    • Danny Hooper's avatar
      fix: add extra field to fixed revisions to avoid creating obsolescence cycles · ad71c792
      Danny Hooper authored
      The extra field prevents sequential invocations of fix from producing the same
      hash twice. Previously, this could cause problems because it would create an
      obsolescence cycle instead of the expected new successor.
      
      This change also adds an explicit check for whether a new revision should be
      committed. Until now, the code relied on memctx.commit() to quietly do nothing
      if the node already exists. Because of the new extra field, this no longer
      covers the case where we don't want to replace an unchanged node.
      
      Differential Revision: https://phab.mercurial-scm.org/D5245
      ad71c792
  8. Nov 06, 2018
  9. Nov 11, 2018
  10. Nov 06, 2018
  11. Oct 31, 2018
    • Danny Hooper's avatar
      fix: add a config to abort when a fixer tool fails · 93bab809
      Danny Hooper authored
      This allows users to stop and address tool failures before proceeding, instead
      of the default behavior of continuing to apply any tools that didn't fail. For
      example, a code formatting tool could fail if you have syntax errors, and you
      might want your repo to stay in its current state while you fix the syntax
      error before re-running 'hg fix'. It's conceivable that this would even be
      necessary for the correctness of some fixer tools across a chain of revisions.
      
      Differential Revision: https://phab.mercurial-scm.org/D5200
      93bab809
  12. Nov 05, 2018
  13. Oct 24, 2018
  14. Nov 05, 2018
    • Pulkit Goyal's avatar
      shallowutil: introduce a helper function isenabled() · 6f0b6905
      Pulkit Goyal authored
      This patch introduces a inenabled() function which will check whether
      remotefilelog is enabled or not. The function is then also used at all the
      places where check whether remotefilelog is enabled or not. The new function
      makes code easy to read without need to understand what is the constant involved
      and why we are checking repo.requirements.
      
      Differential Revision: https://phab.mercurial-scm.org/D5190
      6f0b6905
  15. Oct 24, 2018
  16. Oct 17, 2018
  17. Oct 04, 2018
    • Augie Fackler's avatar
      remotefilelog: rename wireproto methods and remaining capabilities · 466dd4d7
      Augie Fackler authored
      This is a mess, in part because there should be more constants
      throughout. I know we typically do exp- instead of the x_ business in
      this change, but I also had to use this in some function names, so I
      figured until I can break that coupling I'd go with this. If it's too
      unpleasant during review, let me know and I can probably clean it up
      some more.
      
      # no-check-commit due to new foo_bar naming - too hard to avoid right now :(
      
      Differential Revision: https://phab.mercurial-scm.org/D5129
      466dd4d7
  18. Oct 16, 2018
  19. Oct 04, 2018
    • Augie Fackler's avatar
      remotefilelog: rip out lz4 support · e2a1584e
      Augie Fackler authored
      Some methods are left teased out so it's easier to build a migration
      extension from v1 packs to v2. I also anticipate those methods will be
      of use if we get around to adding configurable compression engines
      before we end up jettisoning packs.
      
      I think it would make sense to register one-shot `compress` and
      `decompress` methods on our compression engines in util.py, but
      indygreg mentioned that might not be straightforward.
      
      Differential Revision: https://phab.mercurial-scm.org/D4944
      e2a1584e
    • Augie Fackler's avatar
      remotefilelog: bump pack file formats to version 2 · 10c10da1
      Augie Fackler authored
      Drop support for format 0 and 1 packs. Version 2 will be different in
      that it'll use zlib compression instead of lz4, as the latter isn't
      really suitable for core.
      
      If I can make it work, I'll make compression engines pluggable, but
      the logic for handling these files is spread out enough it's a little
      tricky to get that right.
      
      Test changes are only due to pack files being renamed. The contents of
      the packs are the same.
      
      Differential Revision: https://phab.mercurial-scm.org/D4943
      10c10da1
  20. Oct 16, 2018
Loading