Skip to content
Snippets Groups Projects
  1. Jan 29, 2018
    • Augie Fackler's avatar
      narrow: import experimental extension from narrowhg revision cb51d673e9c5 · a2a6e724
      Augie Fackler authored
      Adjustments:
       * renamed src to hgext/narrow
       * marked extension experimental
       * added correct copyright header where it was missing
       * updated hgrc extension enable line in library.sh
       * renamed library.sh to narrow-library.sh
       * dropped all files from repo root as they're not interesting
       * dropped test-pyflakes.t, test-check-code.t and test-check-py3-compat.t
       * renamed remaining tests to all be test-narrow-* when they didn't already
       * fixed test-narrow-expanddirstate.t to refer to narrow and not narrowhg
       * fixed tests that wanted `update -C .` instead of `merge --abort`
       * corrected a two-space indent in narrowspec.py
       * added a missing _() in narrowcommands.py
       * fixed imports to pass the import checker
       * narrow only adds its --include and --exclude to clone if sparse isn't
         enabled to avoid breaking test-duplicateoptions.py. This is a kludge,
         and we'll need to come up with a better solution in the future.
      
      These were more or less the minimum to import something that would
      pass tests and not create a bunch of files we'll never use.
      
      Changes I intend to make as followups:
       * rework the test-narrow-*-tree.t tests to use the new testcases
         functionality in run-tests.py
       * remove lots of monkeypatches of core things
      
      Differential Revision: https://phab.mercurial-scm.org/D1974
      a2a6e724
  2. Feb 12, 2018
  3. Feb 07, 2018
  4. Feb 08, 2018
  5. Feb 02, 2018
  6. Feb 08, 2018
  7. Feb 02, 2018
  8. Feb 08, 2018
    • Gregory Szorc's avatar
      wireprotoserver: rename _client to client (API) · 957e7736
      Gregory Szorc authored
      This method is called in wireproto.py. It should be part of the public
      API/interface.
      
      .. api::
      
         The ``_client()`` method of the wire protocol handler interface has
         been renamed to ``client()``.
      
      Differential Revision: https://phab.mercurial-scm.org/D2084
      957e7736
    • Gregory Szorc's avatar
      wireprotoserver: remove redirect() and restore() (API) · 56fe8a3b
      Gregory Szorc authored
      These methods on the protocol handler interface are no longer used in
      core.
      
      .. api::
      
         redirect() and restore() have been removed from the wire protocol
         handler interface. Use mayberedirectstdio() instead.
      
      Differential Revision: https://phab.mercurial-scm.org/D2083
      56fe8a3b
    • Gregory Szorc's avatar
      wireproto: use maybecapturestdio() for push responses (API) · caca3ac2
      Gregory Szorc authored
      The "pushres" and "pusherr" response types currently call
      proto.restore() in the HTTP protocol. This completes the pairing
      with proto.redirect() that occurs in the @wireprotocommand
      functions. (But since the SSH protocol has a no-op redirect(),
      it doesn't bother calling restore() because it would also be
      a no-op.)
      
      Having the disconnect between these paired calls is very confusing.
      Knowing that you must use proto.redirect() if returning a "pushres"
      or a "pusherr" is even wonkier.
      
      We replace this confusing code with our new context manager for
      [maybe] capturing output.
      
      The "pushres" and "pusherr" types have gained an "output" argument
      to their constructor and an attribute to hold captured data. The
      HTTP protocol now retrieves output from these objects.
      
      .. api::
      
         ``wireproto.pushres`` and ``wireproto.pusherr`` now explicitly
         track stdio output.
      
      Differential Revision: https://phab.mercurial-scm.org/D2082
      caca3ac2
    • Gregory Szorc's avatar
      wireprotoserver: add context manager mechanism for redirecting stdio · 2ad145fb
      Gregory Szorc authored
      Today, proto.redirect() sets up redirecting stdio and proto.restore()
      undoes that. The API is a bit wonky because restore() is only
      implemented on the HTTP protocol. Furthermore, not all calls to
      redirect() are obviously paired with calls to restore(). For
      example, the call to restore() for "unbundle" requests is handled
      by the response handler for the HTTP protocol.
      
      This commit introduces a new method on the protocol handler interface
      to maybe capture stdio. It emits a file object or None depending on
      whether stdio capture is used by the transport.
      
      To prove it works, the "pushkey" wire protocol command has been
      updated to use the new API.
      
      I'm not convinced this is the best mechanism to capture stdio. I may
      need to come up with something better once the new wire protocol
      emerges into existence. But it is strictly better than before because
      it removes variance in the wire protocol handler interface. It
      therefore gets us closer to a unified interface between the SSH and
      HTTP transports.
      
      Differential Revision: https://phab.mercurial-scm.org/D2081
      2ad145fb
    • Gregory Szorc's avatar
      wireprotoserver: split ssh protocol handler and server · bf676267
      Gregory Szorc authored
      We want to formalize the interface for protocol handlers. Today,
      server functionality (which is domain specific) is interleaved
      with protocol handling functionality (which conforms to a generic
      interface) in the sshserver class.
      
      This commit splits the ssh protocol handling code out of the
      sshserver class.
      
      Differential Revision: https://phab.mercurial-scm.org/D2080
      bf676267
    • Gregory Szorc's avatar
      wireprotoserver: extract SSH response handling functions · 5767664d
      Gregory Szorc authored
      The lookup/dispatch table was cute. But it isn't needed. Future
      refactors will benefit from the handlers for individual response
      types living outside the class.
      
      As part of this, I snuck in a change that changes a type compare
      from str to bytes. This has no effect on Python 2. But it might
      make Python 3 a bit happier.
      
      Differential Revision: https://phab.mercurial-scm.org/D2091
      5767664d
  9. Dec 23, 2017
  10. Dec 22, 2017
  11. Dec 23, 2017
  12. Feb 12, 2018
  13. Feb 11, 2018
Loading