Skip to content
Snippets Groups Projects
  1. Aug 10, 2018
  2. Aug 09, 2018
  3. Aug 10, 2018
  4. Aug 09, 2018
  5. Aug 10, 2018
  6. Aug 09, 2018
    • Augie Fackler's avatar
      dummysmtpd: accept additional kwargs from stdlib smtpd · 78f1899e
      Augie Fackler authored
      This was causing extremely mysterious failures because smtpd is
      implemented using asynchat, which in turn doesn't appear to do
      anything *remotely* helpful if an exception occurs.
      
      # no-check-commit because I'm editing a foo_bar function signature
      
      test-patchbomb-tls.t now passes in Python 3, but only because it
      doesn't check message bodies like test-patchbomb.t. test-patchbomb.t
      is *full* of doubled headers in the output (eg [0]) which seems like
      an odd failure mode.
      
      
      0:
      @@ -141,12 +154,17 @@
         MIME-Version: 1.0
         Content-Type: text/plain; charset="us-ascii"
         Content-Transfer-Encoding: 7bit
      +  MIME-Version: 1.0
      +  Content-Type: text/plain; charset="us-ascii"
      +  Content-Transfer-Encoding: 7bit
         Subject: [PATCH] bookmark
         X-Mercurial-Node: 8dab2639fd35f1e337ad866c372a5c44f1064e3c
         X-Mercurial-Series-Index: 1
         X-Mercurial-Series-Total: 1
      
      Differential Revision: https://phab.mercurial-scm.org/D4219
      78f1899e
    • Augie Fackler's avatar
      mail: fix debug print, which appears to have been broken for a long time · 71312638
      Augie Fackler authored
      I noticed this when trying to debug very mysterious dummysmtpd
      problems. It turns out you can set self.debuglevel to a number greater
      than 0 and have smtplib print helpful debug output, but this output on
      our side of things was broken.
      
      Differential Revision: https://phab.mercurial-scm.org/D4218
      71312638
  7. Jul 16, 2018
  8. Aug 09, 2018
    • Gregory Szorc's avatar
      changegroup: invert conditional and dedent · 0b5f534d
      Gregory Szorc authored
      I don't like else-less blocks that are indented for no reason.
      
      Differential Revision: https://phab.mercurial-scm.org/D4217
      0b5f534d
    • Gregory Szorc's avatar
      changegroup: capture base node instead of rev in delta request · d0d197ab
      Gregory Szorc authored
      I want the API in storage to be defined in terms of nodes, not
      revision numbers.
      
      Differential Revision: https://phab.mercurial-scm.org/D4216
      d0d197ab
    • Gregory Szorc's avatar
      changegroup: introduce requests to define delta generation · e793e11e
      Gregory Szorc authored
      Currently, we iterate through each revision we will be producing
      a delta for then call into 1 of 2 functions for generating that
      delta. Deltas are emitted as we iterate.
      
      A problem with this model is that revision generation is tightly
      coupled to the changegroup code. And the storage layer needs to
      expose APIs like deltaparent() so changegroup delta generation
      can produce a delta with that knowledge.
      
      Another problem is that in this model, deltas can only be produced
      sequentially after the previous delta was produced and emitted.
      Some storage backends might be capable of producing deltas in
      parallel (e.g. if the changegroup deltas are cached somewhere).
      
      This commit aims to solve these problems by turning delta generation
      into a 2 phase implementation where the first phase determines
      info about all the deltas that need to be generated and the 2nd
      phase resolves those deltas.
      
      We introduce a "revisiondeltarequest" object that holds data about
      a to-be-generated delta. We perform a full pass over all revisions
      whose delta is to be generated and generate a "revisiondeltarequest"
      for each. Then we iterate over the "revisiondeltarequest" instances
      and derive a "revisiondelta" for each.
      
      This patch was quite large. In order to avoid even more churn, aspects
      of the implementation are less than ideal. e.g. we're recording
      revision numbers instead of nodes in a few places and we don't
      yet have a formal API for resolving an iterable of revisiondeltarequest
      instances. Things will be improved in subsequent commits.
      
      Unfortunately, this commit reduces performance substantially. For
      `hg perfchangegroupchangelog` on my hg repo:
      
      ! wall 1.512607 comb 1.510000 user 1.490000 sys 0.020000 (best of 7)
      ! wall 2.150863 comb 2.150000 user 2.150000 sys 0.000000 (best of 5)
      
      And for `hg bundle -t none-v2 -a` for the mozilla-unified repo:
      
      178.32user 4.22system 3:02.59elapsed
      190.97user 4.17system 3:15.19elapsed
      
      Some of this was attributed to changelog slowdown. `hg
      perfchangegroupchangelog` on mozilla-unified:
      
      ! wall 21.688715 comb 21.690000 user 21.570000 sys 0.120000 (best of 3)
      ! wall 25.683659 comb 25.680000 user 25.540000 sys 0.140000 (best of 3)
      
      Profiling seems to reveal that the changelog slowdown is due to reading
      changelog revisions multiple times. First in the linknode callback
      to resolve the set of files changed. Second in the delta generation.
      Before, we likely had hit the last revision cache in the revlog when
      doing delta generation since we performed that immediately after
      performing the linknode callback.
      
      I'm not exactly sure where the other ~8s are being spent. It might be
      from overhead of constructing a few million revisiondeltarequest
      objects. I'm OK with the regression for now because it is in service
      of a larger cause (storage abstraction). I'll try to profile later
      and claw back the performance.
      
      Differential Revision: https://phab.mercurial-scm.org/D4215
      e793e11e
    • Gregory Szorc's avatar
      changegroup: refactor delta parent code · ef3d3a2f
      Gregory Szorc authored
      We had recently abstracted the delta parent functions to
      facilitate extracting code from cgpacker. Now that we're in
      a better place, it is time to revisit the design.
      
      Changegroup version 1 requires that the previous node be used as the
      delta parent. Later versions allow any available node to be used
      as the base.
      
      In the case where an arbitrary parent can be used, the choice of
      a delta parent is best left in the hands of the storage backend.
      So it makes sense for the delta parent selection to be hidden
      away in the storage layer. This means deferring the choice of the
      delta parent selection function to as close to delta generation
      time as possible.
      
      This commit moves the delta selection logic to essentially just
      before delta generation. However, because changegroup version 1
      limits what we can do, we have retained the ability to force a
      delta against the previous revision.
      
      As part of this, I realized that the ellipsis parent function was
      unused! That's because ellipsis mode always sends full revisions
      and not deltas.
      
      Differential Revision: https://phab.mercurial-scm.org/D4214
      ef3d3a2f
  9. Aug 08, 2018
Loading