Skip to content
Snippets Groups Projects
  1. Apr 10, 2014
    • Wei, Elson's avatar
      hgweb: override the charset attribute in the http request · 55543ee5
      Wei, Elson authored
      The default http request character set is UTF-8. If the message is not encoded
      in UTF-8, such as big5, it cannot be shown correctly. The 'charset' is
      overridden by the root document's, such that the user can select the proper
      encoding in the browser.
      55543ee5
  2. Apr 11, 2014
  3. Apr 05, 2014
    • Pierre-Yves David's avatar
      localrepo: add unbundle support · 7a679918
      Pierre-Yves David authored
      Localrepo now supports the unbundle method of pushing changegroups. We
      plan to use the unbundle call for bundle2 so it is important that all
      peers supports it. The `peer.unbundle` and `peer.addchangegroup` code
      path have small difference so cause some test output changes. None of those
      changes seems problematic.
      7a679918
    • Pierre-Yves David's avatar
      unbundle: extract the core logic in another function · 33d5fdd9
      Pierre-Yves David authored
      The `exchange` module now contains an `unbundle` function that holds the core
      unbundle logic. The wire protocol keeps its own unbundle function. It enforces
      wireprotocol-specific logic and then calls the extracted function.
      
      This aims at implementing unbundle for localrepo.
      33d5fdd9
    • Pierre-Yves David's avatar
      unbundle: extract checkheads in its own function · 98485027
      Pierre-Yves David authored
      We are going to refactor the unbundle function to have it working on
      a local repository too. Having this function extracted will ease the process.
      
      In the case of non-matching heads, the function now directly raises an
      exception. The top level of the function is catching it.
      98485027
  4. Apr 08, 2014
    • Pierre-Yves David's avatar
      phase: apply publishing enforcement for "serve" source · 63659b80
      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.
      63659b80
  5. Apr 10, 2014
  6. Dec 20, 2013
    • Stéphane Klein's avatar
      http: reuse authentication info after the first failed request (issue3567) · a939eeb9
      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.
      a939eeb9
  7. Apr 08, 2014
    • Durham Goode's avatar
      bundle2: use discard to remove bundle2 cap · ffddabb8
      Durham Goode authored
      caps.remove('bundle2') was throwing an exception if bundle2 wasn't present in
      the capabilities. This was causing test-static-http.t to hang. Let's just use
      discard, so we don't get an exception.
      ffddabb8
  8. Apr 07, 2014
  9. Apr 04, 2014
    • Durham Goode's avatar
      exchange: pass bundlecaps through to changegroup · dbf0fa39
      Durham Goode authored
      The bundlecaps passed to exchange.getbundle were being dropped completely. We
      should pass them on through to the changegroup.
      
      This affected the remotefilelog extension, since it relies on those bundlecaps.
      dbf0fa39
  10. Apr 02, 2014
    • Pierre-Yves David's avatar
      bundle2: allow pulling changegroups using bundle2 · 12f161f0
      Pierre-Yves David authored
      This changeset refactors the pull code to use a bundle2 when available. We keep
      bundle2 disabled by default. The current code is not ready for prime time.
      
      Ultimately we'll want to unify the API of `bunde10` and `bundle20` to have less
      different code. But for now, testing the bundle2 exchange flow is an higher
      priority.
      12f161f0
  11. Apr 04, 2014
    • Pierre-Yves David's avatar
      bundle2: add an exchange.getbundle function · dba91f80
      Pierre-Yves David authored
      This function can return a `HG10` or `HG20` bundle. It uses the `bundlecaps`
      parameters to decides which one to return.
      
      This is a distinct function from `changegroup.getbundle` for two reasons. First
      the APIs of `bundle10` and `bundle20` are not compatible yet. The two functions
      may be reunited in the future. Second `exchange.getbundle` will grow parameters
      for all kinds of data (phases, obsmarkers, ...) so it's better to keep the
      changegroup generation in its own function for now.
      
      This function will be used it in the next changesets.
      dba91f80
    • Pierre-Yves David's avatar
      localpeer: propagate bundlecaps in getbundle call · 8d853cad
      Pierre-Yves David authored
      Best arguments are the ones in use...
      8d853cad
  12. Apr 03, 2014
    • Pierre-Yves David's avatar
      bundle2: make it possible have a global transaction for the unbundling · b24ee507
      Pierre-Yves David authored
      We use the `gettransaction` method approach already used for pull. We
      need this because we do not know beforehand if the bundle needs a
      transaction to be created. And (1) we do not want to create a
      transaction for nothing. (2) Some bundle2 bundles may be read-only and
      do not require any lock or transaction to be held.
      b24ee507
  13. Apr 04, 2014
  14. Mar 25, 2014
  15. Apr 03, 2014
    • Pierre-Yves David's avatar
      bundle2: record processing results in the bundleoperation object · 571f2903
      Pierre-Yves David authored
      Part handlers can now add records to the `bundleoperation` object. This can be
      used to help other parts or to let the caller of the unbundling process react
      to the results.
      571f2903
    • Pierre-Yves David's avatar
      bundle2: introduce a bundleoperation object · 329cd74b
      Pierre-Yves David authored
      This object will hold all data and state gathered through the processing of a
      bundle. This will allow:
      
      - each handler to be aware of the things unbundled so far
      - the caller to retrieve data about the execution
      - bear useful object and logic (like repo, transaction)
      - bear possible bundle2 reply triggered by the unbundling.
      
      For now the object is very simple but it will grow at the same time as the
      bundle2 implementation.
      329cd74b
  16. Apr 02, 2014
  17. Apr 04, 2014
  18. Mar 02, 2014
  19. Feb 28, 2014
  20. Apr 04, 2014
  21. Mar 28, 2014
    • Sean Farley's avatar
      repoview: use _gethiddenblockers in computehidden · c79503f7
      Sean Farley authored
      No functionality has changed, since we've only extracted the code into its own
      function. Now extensions can wrap _gethiddenblockers to provide their own
      blocker without polluting bookmarks or local tags.
      c79503f7
  22. Apr 04, 2014
  23. Mar 28, 2014
    • Sean Farley's avatar
      repoview: improve performance for computehidden (issue4206) · 388af5d4
      Sean Farley authored
      For repos with a large number of heads (including hidden heads), a stale tag
      cache would cause computehidden to be drastically slower because of a the call
      to repo.tags() (which would build the tag cache).
      
      We actually don't need the tag cache for computehidden because we filter out
      global tags. This patch replaces the call to repo.tags with readlocaltags so
      as to avoid the tag cache.
      388af5d4
  24. Apr 04, 2014
  25. Mar 15, 2014
  26. Mar 25, 2014
Loading