Skip to content
Snippets Groups Projects
  1. Oct 09, 2018
    • Gregory Szorc's avatar
      wireprotov2: change how revisions are specified to changesetdata · 41263df0
      Gregory Szorc authored
      Right now, we have a handful of arguments for specifying the revisions
      whose data should be returned. Defining how all these arguments
      interact when various combinations are present is difficult.
      
      This commit establishes a new, generic mechanism for specifying
      revisions. Instead of a hodgepodge of arguments defining things, we
      have a list of dicts that specify revision selectors. The final set
      of revisions is a union of all these selectors.
      
      We implement support for specifying revisions based on:
      
      * An explicit list of changeset revisions
      * An explicit list of changeset revisions plus ancestry depth
      * A DAG range between changeset roots and heads
      
      If you squint hard enough, this problem has already been solved by
      revsets. But I'm reluctant to expose revsets to the wire protocol
      because that would require servers to implement a revset parser.
      Plus there are security and performance implications: the set
      of revision selectors needs to be narrowly and specifically tailored
      for what is appropriate to be executing on a server. Perhaps there
      would be a way for us to express the "parse tree" of a revset
      query, for example. I'm not sure. We can explore this space another
      time. For now, the new mechanism should bring sufficient flexibility
      while remaining relatively simple.
      
      The selector "types" are prefixed with "changeset" because I plan
      to add manifest and file-flavored selectors as well. This will enable
      us to e.g. select file revisions based on a range of changeset
      revisions.
      
      Differential Revision: https://phab.mercurial-scm.org/D4979
      41263df0
    • Gregory Szorc's avatar
      wireprotov2: stop sending phase updates for base revisions · 6c424096
      Gregory Szorc authored
      This feature is broken and doesn't work properly in all scenarios.
      e.g. if we have the following DAGs:
      
      client      server
                  D draft
      C draft     C draft
      B draft     B public
      A public    A public
      
      The current code would only send the phase data for C. The
      client wouldn't see that B moved from draft to public.
      
      This feature will be restored in a future commit. For now, it is
      making refactoring of how revisions are specified in the wire protocol
      a bit difficult...
      
      Differential Revision: https://phab.mercurial-scm.org/D4978
      6c424096
  2. Oct 11, 2018
    • Gregory Szorc's avatar
      debugcommands: support wrapping long lines · 64360202
      Gregory Szorc authored
      If a line within a block is indented more than the line that came before,
      we automatically concatenate it with the previous line. This allows us to
      pretty format data. This will make tests easier to read.
      
      At some point we may just want to evaluate entire blocks as Python
      code or something, as even with this change, things aren't perfect, as we
      can't e.g. have formatting like:
      
      foo eval:[
          True
      ]
      
      But this is strictly better than before, where we couldn't wrap long lines.
      
      Differential Revision: https://phab.mercurial-scm.org/D4977
      64360202
  3. Oct 03, 2018
  4. Oct 09, 2018
    • Gregory Szorc's avatar
      wireprotov2: advertise recommended batch size for requests · 30f70d11
      Gregory Szorc authored
      Currently, exchangev2 hardcodes the batch size for how many revisions
      to fetch per command request. A single value is not appropriate
      for every repository because some repositories may have a drastically
      different "shape" from other repositories. e.g. a repo with lots of
      small files may benefit from larger batch sizes than a repo with lots
      of large files. And depending on caching used by the server, the server
      may wish to control the number of commands (to e.g. mitigate overhead
      of following content redirects).
      
      This commit teaches wireprotov2 commands to declare extra metadata
      which is advertised as part of the command descriptor. The manifestdata
      command has been taught to advertise a recommended batch size for
      requests.
      
      Differential Revision: https://phab.mercurial-scm.org/D4975
      30f70d11
  5. Oct 03, 2018
    • Gregory Szorc's avatar
      httppeer: expose API descriptor on httpv2peer · dac438b7
      Gregory Szorc authored
      The API descriptor in wireprotov2 is much more expressive than
      space-delimited tokens and it will be difficult to define methods
      to query it in all of the ways we'll want to query it. So let's
      just declare defeat and expose the API descriptor on the peer
      instance.
      
      As part of this, we define a new interface for version 2 peers,
      fulfilling a TODO in the process.
      
      Differential Revision: https://phab.mercurial-scm.org/D4974
      dac438b7
  6. Oct 11, 2018
  7. Oct 12, 2018
  8. Oct 11, 2018
  9. Oct 12, 2018
  10. Oct 11, 2018
    • muxator's avatar
      packaging: fix "make centos{5,6,7}" · 9b0cdfb3
      muxator authored
      Without this change, make centos{5,6,7} fails with error:
          cp: cannot stat '<basedir>/rpmbuild/RPMS/*/*': No such file or directory
      
      This change is the exact equivalent of bc4bbc42899a (which applied to Fedora).
      9b0cdfb3
  11. Oct 10, 2018
  12. Oct 11, 2018
  13. Oct 03, 2018
  14. Oct 02, 2018
  15. Oct 01, 2018
  16. Oct 11, 2018
  17. Oct 09, 2018
    • Gregory Szorc's avatar
      wireprotov2: send content encoded frames from server · b5bf3dd6
      Gregory Szorc authored
      Now that we have support for negotiating encodings and configuring
      an encoder, we can start sending content encoded frames from the
      server.
      
      This commit teaches the wireprotov2 server code to send content
      encoded frames.
      
      On the mozilla-unified repository with zstd enabled peers, this change
      reduces the total amount of data transferred from server to client
      drastically:
      
      befor: 7,190,995,812 bytes
      after: 1,605,508,691 bytes
      
      Differential Revision: https://phab.mercurial-scm.org/D4927
      b5bf3dd6
  18. Oct 08, 2018
Loading