Skip to content
Snippets Groups Projects
  1. Jul 13, 2018
  2. Jul 12, 2018
    • Jörg Sonnenberger's avatar
      ssh: avoid reading beyond the end of stream when using compression · 27391d74aaa2
      Jörg Sonnenberger authored
      Compressed streams can be used as part of getbundle. The normal read()
      operation of bufferedinputpipe will try to fulfill the request exactly
      and can deadlock if the server sends less as it is done. At the same
      time, the bundle2 logic will stop reading when it believes it has gotten
      all parts of the bundle, which can leave behind end of stream markers as
      used by bzip2 and zstd.
      
      To solve this, introduce a new optional unbufferedread interface and
      provided it in bufferedinputpipe and doublepipe. If there is buffered
      data left, it will be returned, otherwise it will issue a single read
      request and return whatever it obtains.
      
      Reorganize the decompression handlers to try harder to read until the
      end of stream, especially if the requested read can already be
      fulfilled. Check for end of stream is messy with Python 2, none of the
      standard compression modules properly exposes it. At least with zstd and
      bzip2, decompressing will remember EOS and fail for empty input after
      the EOS has been seen. For zlib, the only way to detect it with Python 2
      is to duplicate the decompressobj and force some additional data into
      it. The common handler can be further optimized, but works as PoC.
      
      Differential Revision: https://phab.mercurial-scm.org/D3937
      27391d74aaa2
  3. Jul 16, 2018
  4. Jul 15, 2018
    • Yuya Nishihara's avatar
      obsolete: explode if metadata contains invalid UTF-8 sequence (API) · ff1182d166a2
      Yuya Nishihara authored
      The current metadata API can be a source of bugs since it forces callers to
      process encoding conversion by themselves. So let's make it reject bad data
      as a last ditch. I assume there's no metadata field which is supposed to store
      arbitrary BLOB like transplant_source.
      ff1182d166a2
    • Yuya Nishihara's avatar
      obsolete: store user name and note in UTF-8 (issue5754) (BC) · 6b5ca1d0aa1e
      Yuya Nishihara authored
      Before, user names were stored in local encoding and transferred across
      repositories, which made it impossible to restore non-ASCII user names on
      different platforms. This patch fixes new markers to be encoded in UTF-8
      and decoded back to local encoding when displaying. Existing markers are
      unfixable so they may result in mojibake.
      
      I don't like the API that requires metadata dict to be UTF-8 encoded, which
      is a source of bugs, but there's no abstraction layer to process the encoding
      thingy efficiently. So we apply the same rule as extras dict to obsstore
      metadata.
      6b5ca1d0aa1e
    • Yuya Nishihara's avatar
      83d965803325
  5. Jul 12, 2018
    • Yuya Nishihara's avatar
      revset: special case commonancestors(none()) to be empty set · e4b270a32ba8
      Yuya Nishihara authored
      This matches the behavior of ancestor(none()).
      
      From an implementation perspective, ancestor() and commonancestors() are
      intersection, and ancestors() is union, so it would make some sense that
      commonancestors(none()) returned all revisions. However, ancestor(none())
      isn't implemented as such, which breaks ancestor(x) == max(commonancestors(x)).
      
      From a user perspective, ancestors of nothing is nothing whichever type
      of operation the ancestor predicate does.
      e4b270a32ba8
  6. Jul 10, 2018
  7. Jul 14, 2018
  8. Jul 08, 2018
  9. Jun 01, 2018
  10. Jul 14, 2018
  11. Jun 22, 2018
  12. Jul 11, 2018
  13. Jun 09, 2018
  14. Jul 10, 2018
  15. Jun 10, 2018
    • Yuya Nishihara's avatar
      fileset: parse argument of size() by predicate function · 1500cbe22d53
      Yuya Nishihara authored
      This change is necessary to pass in a size expression to predicatematcher.
      See the next patch.
      1500cbe22d53
    • Yuya Nishihara's avatar
      fileset: add "tracked()" to explicitly select files in the revision · 131aae58a316
      Yuya Nishihara authored
      I'm going to rewrite filesets to be match predicates, which means basic
      patterns such as '*' will no longer be "closed" to the subset constructed
      from the ctx.
      
      Good thing is that 'hg status "set:not binary()"' can include unknown files
      out of the box, and fileset computation will likely to be faster as we won't
      have to walk dirstate twice, for example. Bad thing is that we can't select
      files at a certain revision by 'set:revs(REV, **)' since '**' is "open" to
      any paths. So, this patch introduces "tracked()" as a replacement for the '**'
      in the example above.
      131aae58a316
  16. Jun 09, 2018
    • Yuya Nishihara's avatar
      fileset: rewrite andset() to not use mctx.narrow() · 80466fd85ac9
      Yuya Nishihara authored
      New code is less efficient than the original, but it helps porting andset()
      to matcher composition. This will be cleaned up later.
      
      This effectively disables the fullmatchctx magic since mctx will never be
      demoted to the matchctx. The fullmatchctx class will be removed later.
      80466fd85ac9
  17. Jun 10, 2018
  18. Jul 14, 2018
  19. Jul 15, 2018
  20. Jul 14, 2018
  21. Jul 12, 2018
  22. Jul 11, 2018
  23. Jul 13, 2018
    • Gregory Szorc's avatar
      scmutil: rewrite docstring for filecache · 3b072388ca78
      Gregory Szorc authored
      The old docstring was incorrect in that it said that subsequent
      calls perform a stat() and refresh the object if things change.
      This is not how things work: __get__ populates obj.__dict__[self.sname]
      with the result of the decorated function and returns this value
      without validation on subsequent calls, if available.
      
      The correct usage of this type is kinda wonky. It would probably
      benefit from a refactor. But I don't have time to do that right
      now. But we can change the docstring so others aren't entrapped by
      its lies (like I was when using repofilecache in a Mozilla extension).
      
      Differential Revision: https://phab.mercurial-scm.org/D3943
      3b072388ca78
  24. Jul 12, 2018
Loading