Skip to content
Snippets Groups Projects
  1. Sep 04, 2018
  2. Aug 31, 2018
  3. Aug 25, 2018
    • Gregory Szorc's avatar
      scmutil: avoid quadratic membership testing (issue5969) · d750a6c9
      Gregory Szorc authored
      tr.changes['revs'] is an xrange, which has an O(n) __contains__
      implementation. The `rev not in newrevs` lookup a few lines below
      will therefore be O(n^2) if all incoming changesets are public.
      
      This issue isn't present on @ because 45e05d39d9ce introduced
      a custom type implementing an xrange primitive with O(1) contains
      and switched tr.changes['revs'] to be an instance of that type.
      
      We work around the problem on the stable branch by casting the
      xrange to a set. This is a bit hacky because it requires allocating
      memory to hold each integer in the range. But we are already
      holding the full set of pulled revision numbers in memory
      multiple times (such as in `tr.changes['phases']`). So this is
      a relatively minor problem.
      
      This issue has been present since the phases reporting code was
      introduced in the 4.7 cycle by eb9835014d20.
      
      This change should be reverted/ignored when stable is merged into
      default.
      
      On the mozilla-unified repository with 483492 changesets, `hg clone`
      time improves substantially:
      
      before: 1843.700s user; 29.810s sys
      after:   461.170s user; 29.360s sys
      d750a6c9
  4. Aug 18, 2018
  5. Aug 20, 2018
  6. Aug 19, 2018
  7. Aug 18, 2018
  8. Aug 17, 2018
    • Boris Feld's avatar
      remotephase: avoid full changelog iteration (issue5964) · f736fdbe
      Boris Feld authored
      Changeset 88efb7d6bcb6 introduced a performance regression by triggering a
      full ancestors walk.
      
      This changeset reworks this logic so that we no longer walk down the full
      changelog. The motivation for 88efb7d6bcb6, issue5939, is still fixed.
      
      mercurial compared to a draft repository
      ----------------------------------------
      
      8eeed92475d5: 0.012637 seconds
      88efb7d6bcb6: 0.202699 seconds (x16)
      46da52f4b820: 0.215551 seconds (+6%)
      this code:    0.008397 seconds (-33% from base)
      
      The payload size reduction we see in `test-bookmarks-pushpull.t` comes from a
      more aggressive filter of nullid and is harmless.
      f736fdbe
    • Boris Feld's avatar
      remotephase: fast path newheads computation in simple case (issue5964) · c89e2fb2
      Boris Feld authored
      Changeset 88efb7d6bcb6 fixed the logic of `phases.newheads` but greatly
      regressed its performance (up to many order of magnitude). The first step to
      fix the regression is to exit early when there is no work to do. If there are
      no heads to filter or not roots to filter them, we don't have to do any work.
      
      This fixes the regression when talking to an all public changeset. The
      performance is even better than before.
      
      pypy, compared to an all public repo
      ------------------------------------
      
      8eeed92475d5: 0.005758 seconds
      88efb7d6bcb6: 0.602517 seconds (x104)
      this code:    0.001508 seconds (-74% from base)
      
      mercurial compared to an all public repo
      ----------------------------------------
      
      8eeed92475d5: 0.000577 seconds
      88efb7d6bcb6: 0.185316 seconds (x321)
      this code:    0.000150 seconds (-74% from base)
      
      The performance of newheads, when actual computations are required, is fixed
      in the next changeset.
      c89e2fb2
    • Boris Feld's avatar
      perf: add a perfphasesremote command · 1732db2f
      Boris Feld authored
      This command measure the time we spend analysing remote phase during push and
      pull and display some information relevant to this computation.
      
      The `test-contrib-perf.t` expected output has to be updated but I do need
      these module for this perf command.
      1732db2f
  9. Aug 15, 2018
    • Boris Feld's avatar
      sparse-revlog: fix delta validity computation · 3730b779
      Boris Feld authored
      When considering the validity of a delta with sparse-revlog, we check the size
      of the largest read. To do so, we use some regular logic with the extra delta
      information. Some of this logic was not handling this extra delta properly,
      confusing it with "nullrev". This confusion with nullrev lead to wrong results
      for this computation but preventing a crash.
      
      Changeset 781b2720d2ac on default revealed this error, crashing. This
      changeset fixes the logic on stable so that the computation is correct (and
      the crash is averted).
      
      The fix is made on stable as this will impact 4.7 clients interacting with
      sparse-revlog repositories (eg: created by later version).
      3730b779
  10. Aug 14, 2018
    • Matt Harbison's avatar
      convert: don't drop missing or corrupt tag entries · 7e023ce2
      Matt Harbison authored
      Cleaning up the tags file could be a useful feature in some cases, so maybe
      there should be a switch for this.  However, the default hg -> hg convert tries
      to maintain identical hashes (thus convert.hg.saverev is off by default, but is
      on by default for other source types).  It looks like _rewritesubstate() has a
      `continue` in it, and therefore a similar problem.
      
      I ran into this conversion divergence when a coworker "merged" two repositories
      by copy/pasting all of the files from the source repo and massaging the code,
      and forgetting to revert the .hg* files.  That silently emptied the .hgtags file
      after the conversion.  (This isn't the manifest node bug Yuya has been helping
      with- this occurred well after the bzr -> hg conversion and wasn't a merge
      commit, which made it extra puzzling.  That bug is still an issue.)
      7e023ce2
  11. Aug 09, 2018
  12. Aug 03, 2018
    • Augie Fackler's avatar
      tests: update test expectations in pre-2.7.9 branch of this test · c9e6ca31
      Augie Fackler authored
      As far as I can tell this is the only spot that got overlooked. Rough
      test methodology (run inside an hg working copy):
      
      docker run --rm -v `pwd`:/hg -it debian:wheezy bash
      apt-get update
      apt-get install python python-dev build-essential unzip mercurial \
        wget libbz2-dev
      make testpy-2.7.8
      
      You could try and use the system Python, but it's 2.7.3 and has lots
      of issues for hg these days that are not worth fixing.
      
      Differential Revision: https://phab.mercurial-scm.org/D4070
      c9e6ca31
  13. Aug 01, 2018
  14. Jul 31, 2018
    • Gregory Szorc's avatar
      ui: remove commands.status.terse=u from ui.tweakdefaults · fe3ca1e6
      Gregory Szorc authored
      commands.status.terse=u can add significant overhead when operating
      on large repositories. Using the Firefox repository:
      
      HGRCPATH= hg --time status
      time: real 1.340 secs (user 0.960+0.000 sys 0.380+0.000)
      
      HGRCPATH= hg --time --config commands.status.terse=u status
      time: real 2.420 secs (user 2.070+0.000 sys 0.360+0.000)
      
      HGRCPATH= hg --time --config extensions.fsmonitor= status
      time: real 0.080 secs (user 0.050+0.010 sys 0.040+0.000)
      
      HGRCPATH= ~/src/hg/hg --time --config extensions.fsmonitor= --config commands.status.terse=u status
      time: real 2.470 secs (user 2.080+0.000 sys 0.390+0.000)
      
      The performance regression - especially when fsmonitor is being
      used - is too much to stomach for the 4.7 release. We've decided
      to remove commands.status.terse=u from ui.tweakdefaults until we
      can improve its performance, hopefully in the 4.8 cycle.
      
      This commit effectively backs out 6acf41bb8d40.
      fe3ca1e6
  15. Jul 25, 2018
    • Pulkit Goyal's avatar
      context: safegaurd against 'lx' being passed as file flag in manifest · d558e53c
      Pulkit Goyal authored
      Subversion can have a file as executable link. When using hgsubversion, we will
      have both islink and isexec True. This will lead to _flags being set to `lx`.
      However, manifest expects flag to be one-byte so it will crash if 'lx' is
      passed. Also it's impossible to have an executable link.
      
      This patch will safegaurd us from having 'lx' being a possible value.
      
      This was authored by Ivan Lezhankin from Yandex.
      
      Differential Revision: https://phab.mercurial-scm.org/D3985
      d558e53c
  16. Jul 31, 2018
  17. Jul 30, 2018
  18. Jul 29, 2018
  19. Jul 27, 2018
  20. Jul 30, 2018
  21. Jul 31, 2018
  22. Jul 30, 2018
    • Boris Feld's avatar
      clone: process 'lookup' return as an arbitrary symbol · e06a10d3
      Boris Feld authored
      In theory, checkout is expected to be a node here because it was returned by
      peer.lookup.
      
      In practice, multiple important extensions (like hg-git, hg-subversion) use
      peers not backed by a mercurial repository where lookup cannot return a node.
      
      Allowing arbitrary symbols is necessary to make these extensions working with
      4.7.
      
      We should probably introduce a new API in Core to have these extensions to
      work without abusing the lookup API. In the meantime, a small change to
      restore compatibility in 4.7 seems in order.
      e06a10d3
    • Augie Fackler's avatar
      tests: use inline Python instead of sed to add trailing whitespace · 8623a6c9
      Augie Fackler authored
      The sed invocation was failing on OS X and FreeBSD. I'm far too lazy
      to diagnose that, so just use some inline Python to fix the build.
      8623a6c9
    • Augie Fackler's avatar
      context: add missing b prefix · 71d6886d
      Augie Fackler authored
      This fixes
        mercurial/context.py:593: SyntaxError: cannot mix bytes and nonbytes literals (context.py, line 593)
      in Python 3.
      71d6886d
  23. Jul 28, 2018
  24. Jul 30, 2018
  25. Jul 28, 2018
  26. Jul 26, 2018
    • Gregory Szorc's avatar
      gitweb: add link to graph · 0f948d82
      Gregory Szorc authored
      error.tmpl wasn't consistent with other templates in gitweb in
      that it was missing a "graph" link. This commit makes it consistent.
      0f948d82
  27. Jul 25, 2018
  28. Jul 20, 2018
    • Boris Feld's avatar
      config: rename `revlog` section into `storage` · ae17555e
      Boris Feld authored
      The idea was suggested by Gregory Szorc on IRC. It is more generic and seems
      better. It is probably best to rename the section before it ever makes into an
      official (non-rc) release.
      
      The only config option currently in this section have been prefixed with
      `revlog` to clarify it applies to `revlog` related storage.
      ae17555e
  29. Jul 19, 2018
Loading