Skip to content
Snippets Groups Projects
  1. Jan 25, 2019
  2. Jan 30, 2019
  3. Jan 29, 2019
  4. Jan 30, 2019
    • Gregory Szorc's avatar
      tests: change how sockets are closed · d343d9ac
      Gregory Szorc authored
      Python 3 uses a different type to represent a socket file object
      than Python 2. We need to conditionalize how the socket is closed
      accordingly.
      
      While we're here, we switch to use socket.shutdown() to close the
      socket. This is because socket.close() may not actually close
      the socket until it is GCd. socket.shutdown() forces an immediate
      shutdown.
      
      I suspect Python 3 changed semantic behavior here, as I can't get
      test-http-bad-server.t to work with socket.close(). socket.shutdown()
      does appear to work, however.
      
      Differential Revision: https://phab.mercurial-scm.org/D5751
      d343d9ac
    • Gregory Szorc's avatar
      tests: add b'' prefixes to badserverext.py · ba729816
      Gregory Szorc authored
      This avoids a handful of failures due to missing str and bytes.
      
      # skip-blame: just a bunch of b'' prefixes
      
      Differential Revision: https://phab.mercurial-scm.org/D5750
      ba729816
    • Gregory Szorc's avatar
      hgweb: log error before attempting I/O · 9b2b8794
      Gregory Szorc authored
      Previously, an uncaught exception during HTTP request serving would
      attempt to send an error response then log the exception.
      
      If an exception occurred during I/O, this exception would be
      raised and the original exception wouldn't be logged.
      
      This commit changes behavior so the original exception is logged
      first, before we attempt to do anything else. This ensures the
      exception is logged.
      
      This change resulted in new tracebacks appearing in various tests.
      
      Because tracebacks can vary between Python versions, we added a
      simple script to filter the stack part of traceback lines. This
      makes testing much simpler, as we don't need to glob over lines
      and make lines conditional.
      
      Differential Revision: https://phab.mercurial-scm.org/D5749
      9b2b8794
  5. Jan 29, 2019
  6. Jan 26, 2019
  7. Oct 13, 2018
  8. Jan 29, 2019
  9. Jan 26, 2019
  10. Jan 29, 2019
    • Matt Harbison's avatar
      lfs: explicitly add the Content-Length header when uploading blobs, for py3 · 1bc01490
      Matt Harbison authored
      This was the reason for test-lfs-test-server.t#git-server complaining about an
      "invalid byte in chunk length".  For some reason if this isn't explicitly added,
      py3.7.1 is adding `transfer-encoding: chunked` as well as `Content-length: x`.
      Wireshark flagged this as malformed.  However, if this is set, it doesn't bother
      with `transfer-encoding`.
      
      Before this patch with py3:
      
        PUT /objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1
        Accept-Encoding: identity
        Content-length: 12
        accept: application/vnd.git-lfs
        content-type: application/octet-stream
        host: localhost:20062
        transfer-encoding: chunked
        user-agent: git-lfs/2.3.4 (Mercurial 4.9rc0+149-7eb7637e34bf)
      
      Before this patch with py27:
      
        PUT /objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1
        Accept-Encoding: identity
        accept: application/vnd.git-lfs
        content-type: application/octet-stream
        content-length: 12
        host: localhost:20062
        user-agent: git-lfs/2.3.4 (Mercurial 4.9rc0+149-7eb7637e34bf+20190128)
      
      With this patch and py3, the content is the same as the py27 example.  RFC2616
      says to ignore `Content-Length` if `Transfer-Encoding` is present, so maybe
      there's nothing to do in the hg-server side (though I'm not sure which it is
      using if presented both).
      
      Maybe chunked encoding is better to do?  If someone knows how to suppress the
      `Content-Length`, we can try that instead.
      1bc01490
  11. Jan 28, 2019
    • Boris Feld's avatar
      perf: support looking up multiple revisions · 7eb7637e
      Boris Feld authored
      The nodemap code has optimisations around the number of lookup we actually made.
      As a result, being able to specify multiple revisions to look up is important
      when measuring performances. One can now specify full revspecs with the --rev
      arguments.
      7eb7637e
  12. Jan 25, 2019
  13. Jan 28, 2019
  14. Jan 25, 2019
  15. Jan 28, 2019
  16. Jan 27, 2019
  17. Jan 28, 2019
Loading