Skip to content
Snippets Groups Projects
  1. Nov 15, 2018
  2. Nov 11, 2018
  3. Nov 14, 2018
    • Kyle Lippincott's avatar
      shelve: use matcher to restrict prefetch to just the modified files · 29e4a77b5305
      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
      29e4a77b5305
  4. Nov 11, 2018
    • Yuya Nishihara's avatar
      logtoprocess: drop support for ui.log() call with invalid msg arguments (BC) · d2c997b8001f
      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.
      d2c997b8001f
    • Yuya Nishihara's avatar
      b2e5a554bc7b
    • Yuya Nishihara's avatar
      logtoprocess: leverage procutil.shellenviron() to stringify variables (BC) · fbac323eb625
      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``.
      fbac323eb625
  5. Nov 13, 2018
  6. Oct 17, 2018
    • Augie Fackler's avatar
      histedit: import chistedit curses UI from hg-experimental · c36175456350
      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
      c36175456350
  7. Nov 09, 2018
  8. Nov 08, 2018
    • Danny Hooper's avatar
      fix: add extra field to fixed revisions to avoid creating obsolescence cycles · ad71c792a8d8
      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
      ad71c792a8d8
  9. Nov 06, 2018
  10. Nov 11, 2018
  11. Nov 06, 2018
  12. Oct 31, 2018
    • Danny Hooper's avatar
      fix: add a config to abort when a fixer tool fails · 93bab80993f4
      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
      93bab80993f4
  13. Nov 05, 2018
  14. Oct 24, 2018
  15. Nov 05, 2018
    • Pulkit Goyal's avatar
      shallowutil: introduce a helper function isenabled() · 6f0b6905ef6f
      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
      6f0b6905ef6f
  16. Oct 24, 2018
    • Pulkit Goyal's avatar
      remotefilelog: remove some BC code related to streamclone · 525dcf5c1d41
      Pulkit Goyal authored
      Since remotefilelog is now moved to core and we have
      streamclone._walkstreamfiles() in core, we don't need to have the backward
      compatibility code.
      
      People with old mercurial version should use remotefilelog from hg-experimental
      repo as IMO remotefilelog will go under a good refactoring and old clients will
      break.
      
      # no-check-commit foo_bar function name
      
      Differential Revision: https://phab.mercurial-scm.org/D5189
      525dcf5c1d41
  17. Oct 17, 2018
  18. Oct 04, 2018
    • Augie Fackler's avatar
      remotefilelog: rename wireproto methods and remaining capabilities · 466dd4d70bff
      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
      466dd4d70bff
Loading