Skip to content
Snippets Groups Projects
  1. Aug 01, 2018
  2. 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
  3. 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
  4. Jul 31, 2018
  5. Jul 30, 2018
  6. Jul 29, 2018
  7. Jul 27, 2018
  8. Jul 30, 2018
  9. Jul 31, 2018
  10. 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
  11. Jul 28, 2018
  12. Jul 30, 2018
  13. Jul 28, 2018
  14. 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
  15. Jul 25, 2018
  16. 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
  17. Jul 19, 2018
  18. Jul 10, 2018
  19. Jul 18, 2018
    • Gregory Szorc's avatar
      merge: mark file gets as not thread safe (issue5933) · be498426
      Gregory Szorc authored
      In default installs, this has the effect of disabling the thread-based
      worker on Windows when manifesting files in the working directory. My
      measurements have shown that with revlog-based repositories, Mercurial
      spends a lot of CPU time in revlog code resolving file data. This ends
      up incurring a lot of context switching across threads and slows down
      `hg update` operations when going from an empty working directory to
      the tip of the repo.
      
      On mozilla-unified (246,351 files) on an i7-6700K (4+4 CPUs):
      
      before: 487s wall
      after:  360s wall (equivalent to worker.enabled=false)
      cpus=2: 379s wall
      
      Even with only 2 threads, the thread pool is still slower.
      
      The introduction of the thread-based worker (02b36e860e0b) states that
      it resulted in a "~50%" speedup for `hg sparse --enable-profile` and
      `hg sparse --disable-profile`. This disagrees with my measurement
      above. I theorize a few reasons for this:
      
      1) Removal of files from the working directory is I/O - not CPU - bound
         and should benefit from a thread pool (unless I/O is insanely fast
         and the GIL release is near instantaneous). So tests like `hg sparse
         --enable-profile` may exercise deletion throughput and aren't good
         benchmarks for worker tasks that are CPU heavy.
      2) The patch was authored by someone at Facebook. The results were
         likely measured against a repository using remotefilelog. And I
         believe that revision retrieval during working directory updates with
         remotefilelog will often use a remote store, thus being I/O and not
         CPU bound. This probably resulted in an overstated performance gain.
      
      Since there appears to be a need to enable the thread-based worker with
      some stores, I've made the flagging of file gets as thread safe
      configurable. I've made it experimental because I don't want to formalize
      a boolean flag for this option and because this attribute is best
      captured against the store implementation. But we don't have a proper
      store API for this yet. I'd rather cross this bridge later.
      
      It is possible there are revlog-based repositories that do benefit from
      a thread-based worker. I didn't do very comprehensive testing. If there
      are, we may want to devise a more proper algorithm for whether to use
      the thread-based worker, including possibly config options to limit the
      number of threads to use. But until I see evidence that justifies
      complexity, simplicity wins.
      
      Differential Revision: https://phab.mercurial-scm.org/D3963
      be498426
    • Gregory Szorc's avatar
      worker: ability to disable thread unsafe tasks · ef3838a4
      Gregory Szorc authored
      The worker on Windows is implemented using a thread pool. If worker
      tasks are not thread safe, badness can occur. In addition, if tasks
      are executing CPU bound code and holding onto the GIL, there will be
      non-substantial overhead in Python context switching between active
      threads. This can result in significant slowdowns of tasks.
      
      This commit teaches the code for determining whether to use a worker
      to take thread safety into account. Effectively, thread unsafe tasks
      don't use the thread-based worker on Windows.
      
      Differential Revision: https://phab.mercurial-scm.org/D3962
      ef3838a4
  20. Jul 17, 2018
  21. Jan 28, 2018
  22. Jul 16, 2018
    • Boris Feld's avatar
      debug: move extensions debug behind a dedicated flag · fcb517ff
      Boris Feld authored
      Since b86664c81833, we process the `--debug` flag earlier. This is overall
      good and useful, but has at least one negative side effect.
      
      Previously the debug message we report when trying to import extensions were
      issued before we processed the `--debug` flag. Now they happen after.
      
      Before:
      
        $ ./hg id --debug
        21f507b8de2f9c1606e9aeb5ec7d2a6dedb7a4a7 tip
      
      After:
      
        $ ./hg id --debug                          ☿ (revset-bench)
        could not import hgext.evolve (No module named evolve): trying hgext3rd.evolve
        could not import hgext.mercurial_keyring (No module named mercurial_keyring): trying hgext3rd.mercurial_keyring
        could not import hgext3rd.mercurial_keyring (No module named mercurial_keyring): trying mercurial_keyring
        could not import hgext.hggit (No module named hggit): trying hgext3rd.hggit
        could not import hgext3rd.hggit (No module named hggit): trying hggit
        21f507b8de2f9c1606e9aeb5ec7d2a6dedb7a4a7 tip
      
      (This get worse if --traceback is used).
      
      To work around this, we move this extensions related debug message behind a
      new flag 'devel.debug.extensions' and restore the previous output.
      
      I'm not fully happy about using the 'devel' section for a flag that can be
      used by legitimate users to debug extensions issues. However, it fits well
      next to other `devel.devel.*` options and is mostly used by extensions author
      anyway.
      
      We might move it to another, more appropriate section in the future (using
      alias).
      fcb517ff
    • Kyle Lippincott's avatar
      d79f3afb
    • Matt Harbison's avatar
      windows: expand '~/' and '~\' to %USERPROFILE% when translating to cmd.exe · c382c19c
      Matt Harbison authored
      It's convenient to be able to reference hooks in a portable location on any
      platform.
      c382c19c
Loading