Skip to content
Snippets Groups Projects
  1. Dec 24, 2016
    • Gregory Szorc's avatar
      httppeer: advertise and support application/mercurial-0.2 · a520aefb96f1
      Gregory Szorc authored
      Now that servers expose a capability indicating they support
      application/mercurial-0.2 and compression, clients can key off
      this to say they support responses that are compressed with
      various compression formats.
      
      After this commit, the HTTP wire protocol client now sends an
      "X-HgProto-<N>" request header indicating its support for
      "application/mercurial-0.2" media type and various compression
      formats.
      
      This commit also implements support for handling
      "application/mercurial-0.2" responses. It simply reads the header
      compression engine identifier then routes the remainder of the
      response to the appropriate decompressor.
      
      There were some test changes, but only to logging. That points to
      an obvious gap in our test coverage. This will be addressed in a
      subsequent commit once server support is in place (it is hard to
      test without server support).
      a520aefb96f1
  2. Oct 28, 2016
    • Katsunori FUJIWARA's avatar
      tests: invoke printenv.py via sh -c for test portability · 34a5f6c66bc5
      Katsunori FUJIWARA authored
      On Windows platform, invoking printenv.py directly via hook is
      problematic, because:
      
        - unless binding between *.py suffix and python runtime, application
          selector dialog is displayed, and running test is blocked at each
          printenv.py invocations
      
        - it isn't safe to assume binding between *.py suffix and python
          runtime, because application binding is easily broken
      
          For example, installing IDE (VisualStudio with Python Tools, or
          so) often requires binding between source files and IDE itself.
      
      This patch invokes printenv.py via sh -c for test portability. This is
      a kind of follow up for d19787db6fe0, which eliminated explicit
      "python" for printenv.py. There are already other 'sh -c "printenv.py"'
      in *.t files, and this fix should be reasonable.
      
      This changes were confirmed in cases below:
      
        - without any application binding for *.py suffix
        - with binding between *.py suffix and VisualStudio
      
      This patch also replaces "echo + redirection" style with "heredoc"
      style, because:
      
        - hook command line is parsed by cmd.exe as shell at first, and
        - single quotation can't quote arguments on cmd.exe, therefore,
        - "printenv.py foobar" should be quoted by double quotation, but
        - nested quoting (or tricky escaping) isn't readable
      34a5f6c66bc5
  3. Aug 03, 2016
  4. Jul 15, 2016
  5. Apr 21, 2016
    • timeless's avatar
      tests: tolerate http2 · b74ca9ace65e
      timeless authored
      You can run tests like this:
      run-tests.py -l --extra-config-opt ui.usehttp2=true
      
      And ideally, no tests should fail...
      b74ca9ace65e
  6. Mar 15, 2016
    • Jun Wu's avatar
      tests: reorder hg serve commands · e01bd7385f4f
      Jun Wu authored
      chg currently does not support hg serve -d. It has a quick path testing if the
      command is hg serve -d and fallbacks to hg if so. But the test only works if
      "serve" is the first argument since the test wants to avoid false positives
      (for example, "-r serve" is different).
      This patch reorders "hg server" commands in tests, making them chg friendly.
      e01bd7385f4f
  7. Jan 06, 2016
    • Mateusz Kwapich's avatar
      hooks: add HG_NODE_LAST to txnclose and changegroup hook environments · d6d3cf5fda6f
      Mateusz Kwapich authored
      Sometimes a txnclose or changegroup hook wants to iterate through all
      the changesets in transaction: in that situation usually the revset
      `$HG_NODE:` is used to select the revisions. Unfortunately this revset
      sometimes may contain too many changesets because we don't have the
      write lock while the hook runs newer changes may be added to
      repository in the meantime.
      
      That's why there is a need for extra variable carrying the information about
      the last change in the transaction.
      d6d3cf5fda6f
  8. Jun 08, 2015
  9. May 27, 2015
  10. May 15, 2015
  11. Apr 15, 2015
  12. Dec 12, 2014
  13. Oct 31, 2014
    • Durham Goode's avatar
      clone: fix copying bookmarks in uncompressed clones (issue4430) · 2dc6b7917cdf
      Durham Goode authored
      ef62c66bee1b broke bookmarks getting copied during uncompressed clones. Since
      most of the pull logic has been moved into exchange.py, lets just call
      exchange.pull to fix up the repo with the latest bits after the streaming clone
      has bootstrapped the repo. This keeps us from having to duplicate the bookmark
      logic.
      2dc6b7917cdf
  14. Oct 16, 2014
    • Mike Hommey's avatar
      changegroup: use a copy of hookargs when invoking the changegroup hook · 7c13c9404c2c
      Mike Hommey authored
      addchangegroup creates a runhook function that is used to invoke the
      changegroup and incoming hooks, but at the time the function is called,
      the contents of hookargs associated with the transaction may have been
      modified externally. For instance, bundle2 code affects it with
      obsolescence markers and bookmarks info.
      
      It also creates problems when a single transaction is used with multiple
      changegroups added (as per an upcoming change), whereby the contents
      of hookargs are that of after adding a latter changegroup when invoking
      the hook for the first changegroup.
      7c13c9404c2c
  15. Oct 12, 2014
  16. Sep 26, 2014
  17. Aug 16, 2014
  18. Aug 06, 2014
  19. Jul 31, 2014
  20. Apr 08, 2014
    • Pierre-Yves David's avatar
      phase: apply publishing enforcement for "serve" source · 63659b809021
      Pierre-Yves David authored
      When a changegroup is added by a push on a publishing server, we ensure they
      are added as public. This is used to enforce publishing on server when the
      client is not aware of phases. It also prevents race conditions where a reader
      could see the changesets as draft before they get turned public by the client.
      Finally, this save rounds trip as the client does not need additional request to
      turn them public.
      
      However, this logic was only enforced when the changegroup was from a "push"
      source. And "push" is used for local pushes only. Wireprotocol push uses "serve"
      as source since Mercurial 1.9. We now enforce this logic for both "push" and
      "serve" sources.
      
      One could note that this logic was mainly useful during wireprotocol exchanges.
      So this code is finally put into good use, 9 versions after its introduction.
      63659b809021
  21. Dec 20, 2013
    • Stéphane Klein's avatar
      http: reuse authentication info after the first failed request (issue3567) · a939eeb94833
      Stéphane Klein authored
      [This was applied in 181108726ea5 but backed out again in af02783dea65 because
      of Python 2.4 issues. This edition and test-http.t works with Python 2.4.]
      
      Context: mercurial access to repository server with http access, and this
      server is protected by basic auth.
      
      Before patch:
      
      * mercurial try an anonymous access to server, server return 401 response and
        mercurial resend request with login / password information
      
      After patch:
      
      * mercurial try an anonymous access to server, server return
        401 response. For all next requests, mercurial keep in memory this
        information (this server need basic auth information).
      
      This patch reduce the number of http access against mercurial server.
      
      Example, before patch:
      
      10.10.168.170 - - [25/Oct/2013:15:44:51 +0200] "GET /hg/testagt?cmd=capabilities
      HTTP/1.1" 401 260 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:44:52 +0200] "GET /hg/testagt?cmd=capabilities
      HTTP/1.1" 200 147 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:00 +0200] "GET /hg/testagt?cmd=capabilities
      HTTP/1.1" 401 260 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:01 +0200] "GET /hg/testagt?cmd=capabilities
      HTTP/1.1" 200 147 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:03 +0200] "GET /hg/testagt?cmd=batch
      HTTP/1.1" 401 260 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:04 +0200] "GET /hg/testagt?cmd=batch
      HTTP/1.1" 200 42 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:06 +0200] "GET /hg/testagt?cmd=getbundle
      HTTP/1.1" 401 260 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:07 +0200] "GET /hg/testagt?cmd=getbundle
      HTTP/1.1" 200 61184 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:09 +0200] "GET /hg/testagt?cmd=listkeys
      HTTP/1.1" 401 260 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:10 +0200] "GET /hg/testagt?cmd=listkeys
      HTTP/1.1" 200 15 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:12 +0200] "GET /hg/testagt?cmd=listkeys
      HTTP/1.1" 401 260 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [25/Oct/2013:15:45:12 +0200] "GET /hg/testagt?cmd=listkeys
      HTTP/1.1" 200 - "-" "mercurial/proto-1.0"
      
      Example after patch:
      
      10.10.168.170 - - [28/Oct/2013:11:49:14 +0100] "GET /hg/testagt?cmd=capabilities
      HTTP/1.1" 401 260 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [28/Oct/2013:11:49:15 +0100] "GET /hg/testagt?cmd=capabilities
      HTTP/1.1" 200 147 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [28/Oct/2013:11:49:17 +0100] "GET /hg/testagt?cmd=batch
      HTTP/1.1" 200 42 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [28/Oct/2013:11:49:19 +0100] "GET /hg/testagt?cmd=getbundle
      HTTP/1.1" 200 61184 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [28/Oct/2013:11:49:22 +0100] "GET /hg/testagt?cmd=listkeys
      HTTP/1.1" 200 15 "-" "mercurial/proto-1.0"
      10.10.168.170 - - [28/Oct/2013:11:49:24 +0100] "GET /hg/testagt?cmd=listkeys
      HTTP/1.1" 200 - "-" "mercurial/proto-1.0"
      
      In this last example, you can see only one 401 response.
      a939eeb94833
  22. Feb 05, 2014
  23. Jan 16, 2014
  24. Aug 08, 2012
  25. Jun 06, 2012
  26. Jun 19, 2012
  27. Jun 21, 2012
  28. Jun 16, 2012
  29. Apr 03, 2012
  30. Nov 07, 2011
  31. Aug 26, 2011
  32. Aug 04, 2011
  33. May 02, 2011
  34. Apr 29, 2011
  35. Feb 20, 2011
  36. Feb 18, 2011
  37. Feb 15, 2011
  38. Oct 09, 2010
  39. Sep 26, 2010
Loading