Skip to content
Snippets Groups Projects
  1. Nov 06, 2014
    • Mateusz Kwapich's avatar
      revlog: add config variable for limiting delta-chain length · 76effa770ff9
      Mateusz Kwapich authored
      The current heuristic for deciding between storing delta and full texts
      is based on ratio of (sizeofdeltas)/(sizeoffulltext).
      
      In some cases (for example a manifest for ahuge repo) this approach
      can result in extremely long delta chains (~30,000) which are very slow to
      read. (In the case of a manifest ~500ms are added to every hg command because of that).
      
      This commit introduces "revlog.maxchainlength" configuration variable that will
      limit delta chain length.
      76effa770ff9
    • Mateusz Kwapich's avatar
      debugrevlog: fix computing chain length in debugrevlog -d · d23834b871ac
      Mateusz Kwapich authored
      The chain length was computed correctly only when generaldelta
      feature was enabled. Now it's fixed.
      
      When generaldelta is disabled the base revision in revlog index is not
      the revision we have delta against - it's always previous revision.
      
      Instead of incorrect chainbaseandlen in command.py we are now using two
      single-responsibility functions in revlog.py:
       - chainbase(rev)
       - chainlen(rev)
      Only chainlen(rev) was missing so it was written to mimic the way the
      chain of deltas is actually found during file reconstruction.
      d23834b871ac
  2. Nov 05, 2014
  3. Nov 10, 2014
  4. Nov 08, 2014
  5. Oct 24, 2014
  6. Oct 23, 2014
  7. Oct 12, 2014
    • Martin von Zweigbergk's avatar
      c26073dfbbe6
    • Martin von Zweigbergk's avatar
      context.status: call _dirstatestatus() from within _buildstatus() · 9fbb50444d55
      Martin von Zweigbergk authored
      By making the call to _dirstatestatus() within _buildstatus(), it
      becomes clearer that it's called only for the workingctx.
      9fbb50444d55
    • Martin von Zweigbergk's avatar
      context.status: move manifest caching trick to _buildstatus() · 39eb9f78f968
      Martin von Zweigbergk authored
      In basectx._buildstatus(), we read the manifests for the two revisions
      being compared. For "caching reasons" unknown to me, it is better to
      read the earlier manifest first, which basectx._prestatus() takes care
      of. However, if the 'self' context is a committablectx and the 'other'
      context is the parent of the working directory (as in the very common
      case of plain "hg status"), there is no need to read any manifests at
      all -- all that's needed is the dirstate status. To avoid reading the
      manifests, _prestatus() is overridden in committablectx and avoids
      calling its super method, and _buildstatus() calls its super method
      only if the 'other' context is not the parent of the working
      directory.
      
      It seems easier to follow what's happening if we move the pre-fetching
      to _buildstatus() just before the place where the manifests are
      fetched. We just need to add an extra check that the revision is not
      None to handle the case that was previously handled by subclass
      overriding. That also makes it safe for committablectx._prestatus() to
      call its parent, although the latter now becomes empty, so we won't
      bother.
      39eb9f78f968
    • Martin von Zweigbergk's avatar
  8. Oct 23, 2014
    • Martin von Zweigbergk's avatar
      context.status: remove overriding in workingctx · 7ea2ef4479f2
      Martin von Zweigbergk authored
      The workingctx method simply calls the super method. The only effect
      it has is that it uses a different default argument for the 'other'
      argument. The only in-tree caller is patch.diff, which always passes
      an argument to the method, so it should be safe to remove the
      overriding. Having the default argument depend on the type seems
      rather dangerous anyway.
      7ea2ef4479f2
  9. Oct 20, 2014
  10. Nov 06, 2014
  11. Nov 05, 2014
  12. Nov 04, 2014
    • Martin von Zweigbergk's avatar
      test-status-rev: remove duplicate tests · c3bfa4deb9ee
      Martin von Zweigbergk authored
      The second group of tests in test-status-rev compare to an empty
      revision. The first group of tests that compare to the first commit
      should be testing all the same states with the missing_* files, so
      drop the second group of tests.
      c3bfa4deb9ee
  13. Nov 07, 2014
    • Gregory Szorc's avatar
      changegroup: sparsely populate fnodes · 5dcaed20b27c
      Gregory Szorc authored
      Previously, fnodes had a key and empty dict value for every element in
      changedfiles. This is somewhat wasteful. Empty dicts in CPython consume
      a lot more memory than you would expect - 280 bytes.
      
      On mozilla-central, which has ~190,000 files/fnodes keys, the previous
      loop populating fnodes allocated 91,924 KB of memory, most of that for
      the empty dicts.
      
      With this patch in place, our peak RSS during mozilla-central clone
      drops:
      
      before:  364,356 KB
      after:   326,008 KB
      delta:   -38,348 KB
      
      When combined with the previous patch, total peak RSS decrease is now
      190,116 KB.
      5dcaed20b27c
    • Gregory Szorc's avatar
      changegroup: don't store unused value on fnodes (issue4443) · bdf7b1ea1dae
      Gregory Szorc authored
      The contents of fnodes are only accessed once per key. It is wasteful to
      cache the value since nobody will use it.
      
      Before this patch, the caching of unused data in fnodes was effectively
      causing a memory leak during the file streaming part of bundle creation.
      
      On mozilla-central (which has ~190,000 entries in fnodes), this patch
      has a significant impact on RSS at the end of generate():
      
      before:  516,124 KB
      after:   364,356 KB
      delta:  -151,768 KB
      
      The origin of this code can be traced back to 627cd7842e5d and has been
      with us since the 2.7 release.
      bdf7b1ea1dae
    • Gregory Szorc's avatar
      changegroup: don't define lookupmf() until it is needed · f4ab47ccefde
      Gregory Szorc authored
      lookupmf() is currently defined earlier than when it is needed. Future
      patches further refactoring this code will be easier to read when
      lookupmf() is in its new home.
      f4ab47ccefde
  14. Nov 05, 2014
    • Pierre-Yves David's avatar
      mail: actually use the verifycert config value · a4af6fd99fb0
      Pierre-Yves David authored
      The mail module only verifies the smtp ssl certificate if 'verifycert' is enabled
      (the default). The 'verifycert' can take three possible values:
      
      - 'strict'
      - 'loose'
      - any "False" value, eg: 'false' or '0'
      
      We tested the validity of the third value, but never converted it to actual
      falseness, making 'False' an equivalent for 'loose'.
      
      This changeset fixes it.
      a4af6fd99fb0
  15. Oct 28, 2014
    • Pierre-Yves David's avatar
      exchange: use the postclose API on transaction · 6b7e60fb0b38
      Pierre-Yves David authored
      As with changegroup, we should wait for the transaction to be really closed
      before scheduling hook execution.
      6b7e60fb0b38
    • Pierre-Yves David's avatar
      changegroup: use the 'postclose' API on transaction · cadc9a723d60
      Pierre-Yves David authored
      The post-transaction hooks run after the lock release (because hooks may want to
      touch the repository), but they must only run if the transaction is successfully
      closed.
      
      We use the new 'addpostclose' method on transaction to register a callback
      installing this post-lock-release call.
      cadc9a723d60
    • Pierre-Yves David's avatar
      transaction: allow registering a post-close callback · 3f543f6be500
      Pierre-Yves David authored
      The addchangegroup code considers the transaction done after a 'tr.close()' call
      and schedules the hook's execution for after lock release. In the nested transaction
      case, the transaction is not yet committed and we must delay this scheduling.
      We add an 'addpostclose' method (like the 'addpending' and 'addfinalize' ones) that
      registers code to be run if the transaction is successfully committed.
      3f543f6be500
  16. Oct 24, 2014
  17. Oct 29, 2014
  18. Oct 25, 2014
  19. Oct 24, 2014
  20. Nov 06, 2014
Loading