Skip to content
Snippets Groups Projects
  1. Oct 20, 2017
  2. Aug 05, 2017
  3. Oct 20, 2017
  4. Oct 19, 2017
  5. Oct 18, 2017
    • Denis Laxalde's avatar
      log: handle binary files in --line-range patterns · 4554649a6ea4
      Denis Laxalde authored
      When a file is binary patch.trydiff() would yield None for 'hunkrange'. Handle
      this case in the hunksfilter() callback.
      Add tests with and without diff.git option as binary handling differs
      depending on this option's value.
      4554649a6ea4
  6. Oct 17, 2017
  7. Oct 19, 2017
  8. Oct 18, 2017
    • Paul Morelle's avatar
      sparse-read: ignore trailing empty revs in each read chunk · 1bde8e8e5de0
      Paul Morelle authored
      An empty entry in the revlog may happen for two reasons:
      - when the file is empty, and the revlog stores a snapshot;
      - when there is a merge and both parents were identical.
      
      `hg debugindex -m | awk '$3=="0"{print}' | wc -l` gives 1917 of such entries
      in my clone of pypy, and 113 on my clone of mercurial.
      
      These empty revision may be located at the end of a sparse chain, and in some
      special cases may lead to read relatively large amounts of data for nothing.
      1bde8e8e5de0
    • Jun Wu's avatar
      fsmonitor: use nonnormalset from dirstatemap · 2e350d2a0eca
      Jun Wu authored
      `dirstate._nonnormalset` has been moved to `dirstate._map.nonnormalset` by
      60927b19ed65 (dirstate: move nonnormal and otherparent sets to dirstatemap)
      and is guaranteed to be existed.
      
      Let's update fsmonitor code to use the new `nonnormalset`. Thix fixed a perf
      regression that slows down `hg status` by 0.5 seconds in one of our
      production repos.
      
      Differential Revision: https://phab.mercurial-scm.org/D1184
      2e350d2a0eca
  9. Oct 19, 2017
  10. Oct 18, 2017
  11. Oct 06, 2017
  12. Oct 17, 2017
    • Pulkit Goyal's avatar
      rebase: add support to output nodechanges · c858afe9c59b
      Pulkit Goyal authored
      This patch adds support to rebase to show the changes in node once the rebase is
      complete. This will be extremely helpful for automation purposes and editors
      such as Nuclide.
      
      The output is a dictionary of predecessor hash as key and a list of successors'
      hashes. The successors one is a list as there can be many successors for a single
      predecessor in case of split and it will good to have a generic output format.
      
      This patch adds tests for the same. A new file is created for the patch as
      existing files related to rebase has their own purpose and there will be more
      formatter support coming for rebase in next cycle.
      
      Thanks to Jun for suggesting to use fm.data().
      
      Differential Revision: https://phab.mercurial-scm.org/D1173
      c858afe9c59b
    • Saurabh Singh's avatar
      ui: move request exit handlers to global state · e9f320a40b44
      Saurabh Singh authored
      Since the ui objects can be created with the 'load' class method, it
      is possible to lose the exit handlers information from the old ui instance. For
      example, running 'test-bad-extension.t' leads to this situation where chg
      creates a new ui instance which does not copy the exit handlers from the
      earlier ui instance. For exit handlers, which are special cases anyways, it
      probably makes sense to have a global state of the handlers. This would ensure
      that the exit handlers registered once are definitely executed at the end of
      the request.
      
      Test Plan:
      Ran all the tests without '--chg' option. This also fixes the
      'test-bad-extension.t' with the '--chg' option.
      
      Differential Revision: https://phab.mercurial-scm.org/D1166
      e9f320a40b44
  13. Oct 18, 2017
    • Paul Morelle's avatar
      sparse-read: skip gaps too small to be worth splitting · 8c9b08a0c48c
      Paul Morelle authored
      Splitting at too small gaps might not be worthwhile. With this changeset,
      we stop considering splitting on too small gaps. The threshold is configurable.
      We arbitrarily pick 256K as a default value because it seems "okay".
      Further testing on various repositories and setups will be needed to tune it.
      
      The option name is 'experimental.sparse-read.min-gap-size`, and replaces
      `experimental.sparse-read.min-block-size` which is not used any more.
      8c9b08a0c48c
    • Boris Feld's avatar
      sparse-read: move from a recursive-based approach to a heap-based one · 9e18ab7f7240
      Boris Feld authored
      The previous recursive approach was trying to optimise each read slice to have
      a good density. It had the tendency to over-optimize smaller slices while
      leaving larger hole in others.
      
      The new approach focuses on improving the combined density of all the reads,
      instead of the individual slices. It slices at the largest gaps first, as they
      reduce the total amount of read data the most efficiently.
      
      Another benefit of this approach is that we iterate over the delta chain only
      once, reducing the overhead of slicing long delta chains.
      
      On the repository we use for tests, the new approach shows similar or faster
      performance than the current default linear full read.
      
      The repository contains about 450,000 revisions with many concurrent
      topological branches. Tests have been run on two versions of the repository:
      one built with the current delta constraint, and the other with an unlimited
      delta span (using 'experimental.maxdeltachainspan=0')
      
      Below are timings for building 1% of all the revision in the manifest log using
      'hg perfrevlogrevisions -m'. Times are given in seconds. They include the new
      couple of follow-up changeset in this series.
      
      delta-span  standard    unlimited
      linear-read     922s         632s
      sparse-read     814s         566s
      9e18ab7f7240
    • Matt Harbison's avatar
      subrepo: implement 'unshare' for Mercurial subrepos · 7d51a7792f52
      Matt Harbison authored
      I think there's a slight hole here in that a subrepo could be shared, removed
      from .hgsub, and then it's not part of context.substate (so not iterated over).
      But the push command has the same hole IIRC, and I think removing a subrepo is
      an edge case.
      
      The import hack is a copy/paste of subrepo.subrepo().
      7d51a7792f52
    • Matt Harbison's avatar
      share: move the implementation of 'unshare' to the 'hg' module · 9f7ecc5bbc28
      Matt Harbison authored
      This will be used to setup unsharing subrepos.  Usually cmdutil is used for
      this purpose.  But the implementation needs hg.copystore(), and the hg module
      already imports cmdutil.
      9f7ecc5bbc28
  14. Oct 17, 2017
  15. Oct 18, 2017
Loading