Skip to content
Snippets Groups Projects
  1. 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
  2. Jul 09, 2018
  3. 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
  4. 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
  5. Jul 10, 2018
  6. May 17, 2018
  7. Jul 10, 2018
  8. Jun 19, 2018
  9. Jul 10, 2018
  10. Jun 22, 2018
  11. Jul 05, 2018
    • Sangeet Kumar Mishra's avatar
      grep: change default behaviour to search working directory files (BC) · 9ef10437
      Sangeet Kumar Mishra authored
      With this patch, grep searches on the working directory by default
      and looks for all files tracked by the working directory and greps on them.
      
      ### OLD BEHAVIOUR
      $ hg init a
      $ cd a
      $ echo "some text">>file1
      $ hg add file1
      $ hg commit -m "adds file1"
      $ hg mv file1 file2
      $ hg grep "some"
      `file2:1:some text`
      `file1:0:some text`
      
      This behaviour is undesirable since file1 is not in the current history and was
      renamed as file2, so the second result was redundant and confusing.
      
      ### NEW BEHAVIOUR
      $ hg init a
      $ cd a
      $ echo "some text">>file1
      $ hg add file1
      $ hg commit -m "adds file1"
      $ hg mv file1 file2
      $ hg grep "some"
      `file2:2147483647:some text`
      
      Differential Revision: https://phab.mercurial-scm.org/D3826
      9ef10437
  12. Jul 10, 2018
    • Sune Foldager's avatar
      patch: don't separate \r and \n when colorizing diff output · e1987261
      Sune Foldager authored
      When displaying diffs, \r at the end of a line is treated as trailing
      whitespace. This causes an ANSI escape code to be inserted between \r and \n.
      Some programs, such as less since version 530 (maybe earlier, but at least not
      version 487) displays ^M when it encounters a lone \r. This causes a lot of
      noise in diff output on Windows, where \r\n is used to terminate lines.
      
      We avoid that by treating both \n and \r\n as end of line when considering
      trailing whitespace.
      e1987261
  13. Jul 08, 2018
  14. Jun 21, 2018
  15. Jun 26, 2018
    • Sean Farley's avatar
      revset: add optimization for heads(commonancestors()) · 52f19a84
      Sean Farley authored
      Previously, the only way to get these commits were (tested on
      mozilla-central):
      
      hg perfrevset 'heads(::a7cf55 and ::d8b15)'
      ! wall 4.988366 comb 4.960000 user 4.780000 sys 0.180000 (best of 3)
      
      After this patch:
      
      (python)
      hg perfrevset 'heads(commonancestors(a7cf55 + d8b15))'
      ! wall 0.002155 comb 0.000000 user 0.000000 sys 0.000000 (best of 1107)
      
      (C)
      hg perfrevset 'heads(commonancestors(a7cf55 + d8b15))'
      ! wall 0.000568 comb 0.000000 user 0.000000 sys 0.000000 (best of 4646)
      52f19a84
  16. Jun 19, 2018
    • Sean Farley's avatar
      revsets: add commonancestors revset · 54609263
      Sean Farley authored
      This is a method to reproduce "::x and ::y" such that a set can be sent
      in. For instance, it'd be convenient to have "::heads()" work like this
      but that already means "::x + ::y + ..." for each element in the
      "heads()" set.
      
      Therefore, we add the "commonancestors" method to mean "::x and ::y ..."
      for each head in the given set.
      54609263
  17. Jul 09, 2018
  18. Jul 10, 2018
  19. Jun 05, 2018
  20. May 28, 2018
  21. May 24, 2018
  22. Apr 28, 2018
  23. Mar 15, 2018
  24. Jun 10, 2018
    • Yuya Nishihara's avatar
      fileset: pass in badfn to inner matchers · 5cbcbe51
      Yuya Nishihara authored
      Just for sanity. No idea if this will make a difference, but it should
      propagate the badfn because the matcher created by mctx.matcher() will be
      returned by fileset.match() in future patches.
      5cbcbe51
  25. Jun 09, 2018
    • Yuya Nishihara's avatar
      fileset: restrict getfileset() to not return a computed set (API) · 760cc5dc
      Yuya Nishihara authored
      And rename the functions accordingly. fileset.match() will be changed to
      not compute the initial subset.
      
      test-glog*.t get back to the state before 9f9ffe5f687c "match: compose
      'set:' pattern as matcher."
      760cc5dc
    • Yuya Nishihara's avatar
      match: add prefixdirmatcher to adapt subrepo matcher back · 0ba4cf3f
      Yuya Nishihara authored
      This serves as an inverse function to the subdirmatcher, and will be used
      to wrap a fileset matcher of subrepositories. One of the root/prefix paths
      could be deduced from the matcher attributes to be wrapped, but we don't
      since the callers of this class know the root/prefix paths and can simply
      pass them in.
      0ba4cf3f
    • Yuya Nishihara's avatar
      fileset: make debugfileset filter repository files · 3d8ef605
      Yuya Nishihara authored
      This prepares for the structural change of the fileset. A computed fileset
      will no longer be a set of files, but a boolean function (i.e. matcher) to
      test if an input file matches the given fileset expression.
      
      --all-files option is added because some examples in the test need to scan
      files across revisions.
      3d8ef605
  26. Jul 08, 2018
Loading