Skip to content
Snippets Groups Projects
  1. Jul 13, 2018
    • Gregory Szorc's avatar
      scmutil: rewrite docstring for filecache · 3b072388
      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
      3b072388
  2. Jul 12, 2018
  3. Jul 11, 2018
  4. Jul 12, 2018
  5. Jun 30, 2018
    • Sushil Khanchi's avatar
      rebase: add --confirm option · 572dff5c
      Sushil Khanchi authored
      This feature adds a functionality in rebase to confirm before applying
      changes.
      When there is no conflict and user confirm to apply actions, we just
      finish the unfinished rebase. But when there is a conflict and user
      confirm to apply actions then we can't just finish rebasing using
      rbsrt._finishrebase() because in-memory merge doesn't support conflicts, so
      we have to abort and run on-disk merge in this case.
      And if user doesn't confirm to apply actions then simply abort the rebase.
      
      Differential Revision: https://phab.mercurial-scm.org/D3870
      572dff5c
  6. Jul 11, 2018
  7. Jul 10, 2018
    • Yuya Nishihara's avatar
      grep: hide cryptic revision number by default · aabc01da
      Yuya Nishihara authored
      I believe nobody would want to see the "2147483647:" prefix while grepping
      working directory files.
      
      The wdir revision is still visible if "-r wdir()" is specified since a revset
      may point to more than one revisions, and it seems confusing to change the
      visibility dynamically by the number of the matched revisions.
      
      Differential Revision: https://phab.mercurial-scm.org/D3920
      aabc01da
  8. Jul 11, 2018
  9. Jun 21, 2018
    • Paul Morelle's avatar
      debugdeltachain: avoid division by zero when a chain is empty · 93313f66
      Paul Morelle authored
      The two ratios chainratio and extraratio are computed using dividers
      that may be zero when the file is empty.
      As the denominators are integers, the limit of the ratio "just before zero" is
      the numerator value itself.
      If the numerator itself is zero, the ratio value is still meaningful: in both
      cases, a "good" value is a low ratio, and a size of zero is the optimal case.
      93313f66
  10. Jul 09, 2018
  11. Jul 10, 2018
    • Boris Feld's avatar
      revlog: enforce chunk slicing down to a certain size · 43d0619c
      Boris Feld authored
      Limit maximum chunk size to 4x final size when reading a revision from a
      revlog. We only apply this logic when the target size is known from the
      revlog.
      
      Ideally, revlog's delta chain would be written in a way that does not trigger
      this extra slicing often. However, having this second guarantee that we won't
      read unexpectedly large amounts of memory in all cases is important for the
      future. Future delta chain building algorithms might have good reason to
      create delta chain with such characteristics.
      
      Including this code in core as soon as possible will make Mercurial 4.7
      forward-compatible with such improvement.
      43d0619c
    • Boris Feld's avatar
      revlog: postprocess chunk to slice them down to a certain size · 967fee55
      Boris Feld authored
      After the density slicing is done, we enforce a maximum chunk size to avoid
      memory consumption issue.
      967fee55
  12. Jul 11, 2018
    • Boris Feld's avatar
      revlog: add function to slice chunk down to a given size · e59e27e5
      Boris Feld authored
      It is possible to encounter situations where the slicing based on density did
      not achieve chunk smaller than the 4*textlength limit. To avoid extra memory
      consumption in those cases, we need to be able to break down chunk to a given
      size. Actual caller comes in the next changesets.
      e59e27e5
  13. Jul 10, 2018
Loading