Skip to content
Snippets Groups Projects
  1. Nov 05, 2017
  2. Oct 12, 2017
    • Denis Laxalde's avatar
      transaction-summary: show the range of new revisions upon pull/unbundle (BC) · eb586ed5d8ce
      Denis Laxalde authored
      Upon pull or unbundle, we display a message with the range of new revisions
      fetched. This revision range could readily be used after a pull to look out
      what's new with 'hg log'. The algorithm takes care of filtering "obsolete"
      revisions that might be present in transaction's "changes" but should not be
      displayed to the end user.
      eb586ed5d8ce
  3. Oct 05, 2017
    • Saurabh Singh's avatar
      serve: make tests compatible with chg · a6d95a8b7243
      Saurabh Singh authored
      chg only supports 'hg serve' when the options to the serve command
      follow the 'hg serve'. For example, 'hg -R <repo> serve ..' is unsupported.
      This leads to issues with chg running for the following tests:
      
       - test-bundle2-exchange.t
       - test-clone-uncompressed.t
       - test-hgweb-csp.t
       - test-http-bad-server.t
       - test-http-bundle1.t
       - test-http-protocol.t
       - test-http.t
      
      There was an effort made earlier to fix this issue for chg and the tests were
      fixed to confirm to the compatible pattern. But the new tests did not take care
      of the same and hence, fail. Hopefully, there will be continuous build setup
      for chg after all tests are made compatible with chg so that we can avoid such
      issues.
      
      Test Plan:
      Ran the aforementioned tests with and without '--chg' option.
      
      Differential Revision: https://phab.mercurial-scm.org/D946
      a6d95a8b7243
  4. Oct 01, 2017
    • Gregory Szorc's avatar
      commands: rename clone --uncompressed to --stream and document · fffd3369aa83
      Gregory Szorc authored
      --uncompressed isn't a very good name and its description in the
      help documentation isn't very useful. We refer to this concept as
      "stream clones" in a number of places. I think it makes sense to
      change the user-facing argument to use the mode --stream. So this
      commit does that.
      
      We keep --uncompressed around for backwards compatibility.
      
      While we're here, we overhaul the help docs for streaming clones
      to be somewhat useful.
      
      All tests have been updated to reflect the new preferred --stream
      argument. A test for backwards compatibility of --uncompressed has
      been added.
      
      .. bc::
      
         `hg clone --stream` should now be used instead of --uncompressed.
      
         --uncompressed is marked as deprecated and is an alias for --stream.
         There is no schedule for elimination of --uncompressed.
      
      Differential Revision: https://phab.mercurial-scm.org/D864
      fffd3369aa83
  5. May 11, 2017
  6. May 09, 2017
  7. Mar 31, 2017
  8. Mar 30, 2017
    • Pierre-Yves David's avatar
      run-tests: auto-replace 'TXNID' output · 728d37353e1e
      Pierre-Yves David authored
      Hooks related to the transaction are aware of the transaction id. By definition
      this txn-id is unique and different for each transaction. As a result it can
      never be predicted in test and always needs matching. As a result, touching any
      like with this data is annoying. We solve the problem once and for all by
      installing an automatic replacement. In test, this will now show as:
      
        TXNID=TXN:$ID$
      728d37353e1e
  9. Feb 16, 2017
    • Jun Wu's avatar
      runtests: set web.address to localhost · 161ab32b44a1
      Jun Wu authored
      Previously, "hg serve" will listen on "", which is not clear which interface
      it will actually listen on - it could listen on all interfaces (ex. 0.0.0.0
      on IPv4).
      
      The run-tests.py script only checks "localhost" for available ports. So
      let's make it the same for "hg serve" by explicitly setting "web.address" to
      "localhost".
      
      This resolves some IPv6 EADDRINUSE errors.
      161ab32b44a1
  10. Feb 10, 2017
    • Pierre-Yves David's avatar
      wireproto: properly report server Abort during 'getbundle' · f3807a135e43
      Pierre-Yves David authored
      Previously Abort raised during 'getbundle' call poorly reported (HTTP-500 for
      http, some scary messages for ssh). Abort error have been properly reported for
      "push" for a long time, there is not reason to be different for 'getbundle'. We
      properly catch such error and report them back the best way available. For
      bundle, we issue a valid bundle2 reply (as expected by the client) with an
      'error:abort' part. With bundle1 we do as best as we can depending of http or
      ssh.
      f3807a135e43
  11. 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
  12. 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
  13. Aug 03, 2016
  14. Jul 15, 2016
  15. 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
  16. 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
  17. 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
  18. Jun 08, 2015
  19. May 27, 2015
  20. May 15, 2015
  21. Apr 15, 2015
  22. Dec 12, 2014
  23. 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
  24. 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
  25. Oct 12, 2014
  26. Sep 26, 2014
  27. Aug 16, 2014
  28. Aug 06, 2014
  29. Jul 31, 2014
  30. 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
  31. 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
  32. Feb 05, 2014
  33. Jan 16, 2014
  34. Aug 08, 2012
  35. Jun 06, 2012
  36. Jun 19, 2012
  37. Jun 21, 2012
Loading