Skip to content
Snippets Groups Projects
  1. Aug 07, 2016
  2. Aug 08, 2016
    • Gregory Szorc's avatar
      hgweb: config option to control zlib compression level · 5e236569
      Gregory Szorc authored
      Before this patch, the HTTP transport protocol would always zlib
      compress certain responses (notably "getbundle" wire protocol commands)
      at zlib compression level 6.
      
      zlib can be a massive CPU resource sink for servers. Some server
      operators may wish to reduce server-side CPU requirements while
      requiring more bandwidth. This is common on corporate intranets, for
      example. Others may wish to use more CPU but reduce bandwidth.
      
      This patch introduces a config option to allow server operators
      to control the zlib compression level.
      
      On the "mozilla-unified" generaldelta repository, setting this
      value to "0" (disable compression) results in server-side CPU
      utilization for a `hg clone` going from ~180s to ~124s CPU time on
      my i7-6700K.  A level of "1" (which increases the transfer size from
      ~1,074 MB at level 6 to ~1,222 MB) utilizes ~132s CPU time.
      5e236569
  3. Aug 07, 2016
    • Gregory Szorc's avatar
      help: don't try to render a section on sub-topics · aba2bb2a
      Gregory Szorc authored
      This patch subtly changes the behavior of the parsing of "X.Y" values
      to not set the "section" variable when rendering a known sub-topic.
      Previously, "section" would be the same as the sub-topic name. This
      required the sub-topic RST to have a section named the same as the
      sub-topic name.
      
      When I made this change, the descriptions from help.internalstable
      started being rendered in command line output. This didn't look correct
      to me, as it didn't match the formatting of main help pages. I
      corrected this by moving the top section to help.internalstable and
      changing the section levels of all the "internals" topics.
      
      The end result is that "internals" topics now match the rendering of
      main topics on both the CLI and HTML. And, "internals" topics no longer
      require a main section matching the name of the topic.
      aba2bb2a
  4. Aug 05, 2016
  5. Aug 07, 2016
  6. Aug 05, 2016
  7. Aug 06, 2016
    • Katsunori FUJIWARA's avatar
      demandimport: omit default value of "level" at construction of _demandmod · ae9a4d6a
      Katsunori FUJIWARA authored
      This makes construction of _demandmod require explicit level value,
      and helps to avoid issues like issue5208 in the future.
      ae9a4d6a
    • Katsunori FUJIWARA's avatar
      demandimport: import sub-module relatively as expected (issue5208) · 14f077f7
      Katsunori FUJIWARA authored
      Before this patch, importing sub-module might (1) fail or (2) success
      but import incorrect module, because demandimport tries to import
      sub-module with level=-1 (on Python 2.x) or level=0 (on Python 3.x),
      which is default value of "level" argument at construction of
      "_demandmod" proxy object.
      
        (1) on Python 3.x, importing sub-module always fails to import
            existing sub-module
      
        (2) both on Python 2.x and 3.x, importing sub-module might import
            same name module on root level unintentionally
      
            On Python 2.x, existing sub-module is prior to this unexpected
            module. Therefore, this problem hasn't appeared.
      
      To import sub-module relatively as expected, this patch specifies "1"
      as import level explicitly at construction of "_demandmod" proxy
      object for sub-module.
      14f077f7
    • Gregory Szorc's avatar
      wireproto: remove gboptslist (API) · 919a4b7f
      Gregory Szorc authored
      This variable has been unused since ce25f465e572, which was over
      2 years ago. gboptsmap should be used instead.
      
      Marking as API because this could break extensions.
      919a4b7f
    • Gregory Szorc's avatar
      wireproto: unescape argument names in batch command (BC) · 62e2e048
      Gregory Szorc authored
      Clients escape both argument names and values when using the
      batch command. Yet the server was only unescaping argument values.
      
      Fortunately we don't have any argument names that need escaped. But
      that isn't an excuse to lack symmetry in the code.
      
      Since the server wasn't properly unescaping argument names, this
      means we can never introduce an argument to a batchable command that
      needs escaped because an old server wouldn't properly decode its name.
      So we've introduced an assertion to detect the accidental introduction
      of this in the future. Of course, we could introduce a server
      capability that says the server knows how to decode argument names and
      allow special argument names to go through. But until there is a need
      for it (which I doubt there will be), we shouldn't bother with adding
      an unused capability.
      62e2e048
    • Gregory Szorc's avatar
      wireproto: consolidate code for obtaining "cmds" argument value · bb04f96d
      Gregory Szorc authored
      Both wireproto.py and sshpeer.py had code for producing the value to
      the "cmds" argument used by the "batch" command. This patch extracts
      that code to a standalone function and uses it.
      bb04f96d
  8. Aug 05, 2016
  9. Jul 27, 2016
  10. Aug 05, 2016
  11. Aug 04, 2016
  12. Aug 05, 2016
    • Augie Fackler's avatar
      check-commit: allow underbars in cffi_-prefix function names · 37b6f0ec
      Augie Fackler authored
      It seems reasonable to give cffi functions slightly more verbose names
      in some circumstances, given the way they interface with C.
      37b6f0ec
    • Augie Fackler's avatar
      bundlerepo: add support for treemanifests in cg3 bundles · 55d34187
      Augie Fackler authored
      This is a little messier than I'd like, and I'll probably come back
      and do some more refactoring later, but as it is this unblocks
      narrowhg. An alternative approach (which I may do as part of the
      mentioned refactoring) would be to construct *all* dirlog instances up
      front, so that we don't have to keep track of the linkmapper
      method. This would avoid a reference cycle between the bundlemanifest
      and the bundlerepository, but I was hesitant to do all the work up
      front like that.
      
      With this change, it's possible to do 'hg incoming' and 'hg pull' from
      bundles in .hg/strip-backup in a treemanifest repository. Sadly, this
      doesn't make it possible to 'hg clone' one of those (if you do 'hg
      strip 0'), because the cg3 in the bundle gets written without a
      treemanifest flag. Since that's going to be an involved refactor in a
      different part of the code (which I *suspect* won't touch any of the
      code I've just written here), let's leave it as an idea for Later.
      55d34187
    • Augie Fackler's avatar
      auditvfs: forward options property from nested vfs · 69109052
      Augie Fackler authored
      This was breaking my ability to use treemanifests in bundlerepos, and
      was deeply mysterious. We should probably just make the options
      property a formal part of the vfs API, and make it a required
      construction parameter. Sadly, I don't have time to dive into that
      refactor right now.
      69109052
  13. Aug 04, 2016
  14. Aug 05, 2016
Loading