Skip to content
Snippets Groups Projects
  1. Feb 14, 2016
    • Pierre-Yves David's avatar
      rebase: choose default destination the same way as 'hg merge' (BC) · fac3a24be50e
      Pierre-Yves David authored
      This changeset finally make 'hg rebase' choose its default destination using the
      same logic as 'hg merge'. The previous default was "tipmost changeset on the
      current branch", the new default is "the other head if there is only one".  This
      change has multiple consequences:
      
      - Multiple tests which were not rebasing anything (rebasing from tipmost head)
        are now rebasing on the other "lower" branch. This is the expected new
        behavior.
      
      - A test is now explicitly aborting when there is too many heads on the branch.
        This is the expected behavior.
      
      - We gained a better detection of the "nothing to rebase" case while performing
        'hg pull --rebase' so the message have been updated. Making clearer than an
        update was performed and why. This is beneficial side-effect.
      
      - Rebasing from an active bookmark will behave the same as 'hg merge' from a
        bookmark.
      fac3a24be50e
  2. Feb 17, 2016
  3. Feb 19, 2016
    • Sune Foldager's avatar
      hgwebdir_wsgi: update script and expand help · d3da97e58d42
      Sune Foldager authored
      I've updated the script to reflect changes in Mercurial and to include a much
      more through installation guide with configuration examples and details on how
      to configure IIS. I've used the script to set up a working server from scratch.
      d3da97e58d42
  4. Feb 22, 2016
  5. Feb 17, 2016
    • liscju's avatar
      rebase: adds storing collapse message (issue4792) · c7e8948627f3
      liscju authored
      Before this patch collapse message wasn't stored so when
      you ran into the merge conflict while rebasing, running
      rebase --continue didn't remember the message and
      always opened editor to fill commit message.
      
      This patch adds saving collapse message in
      .hg/last-message.txt and restoring it later
      when needed.
      c7e8948627f3
  6. Feb 22, 2016
  7. Feb 16, 2016
    • Martijn Pieters's avatar
      automv: use 95 as the default similarity threshold · e07daee83029
      Martijn Pieters authored
      The motivation for the change from 100 to 95 is included in a comment.
      
      * Updated the tests to include a change to a moved file that still should be
        caught as a move.
      
      * Use ui.configint() to non-integer configuration entries more gracefully. Also
        complain if a similarity outside of the acceptable range is set.
      e07daee83029
  8. Feb 19, 2016
  9. Feb 20, 2016
    • Gregory Szorc's avatar
      worker: change partition strategy to every Nth element · f8efc8a3a991
      Gregory Szorc authored
      The only consumer of the worker pool code today is `hg update`.
      
      Previously, the algorithm to partition work to each worker process
      preserved input list ordering. We'd take the first N elements, then
      the next N elements, etc. Measurements on mozilla-central demonstrate
      this isn't an optimal partitioning strategy.
      
      I added debug code to print when workers were exiting. When performing
      a working copy update on a previously empty working copy of
      mozilla-central, I noticed that process lifetimes were all over the
      map. One worker would complete after 7s. Many would complete after
      12s. And another worker would often take >16s. This behavior occurred
      for many worker process counts and was more pronounced on some than
      others.
      
      What I suspect is happening is some workers end up with lots of
      small files and others with large files. This is because the update
      code passes in actions according to sorted filenames. And, directories
      under tend to accumulate similar files. For example, test directories
      often consist of many small test files and media directories contain
      binary (often larger) media files.
      
      This patch changes the partitioning algorithm to select every Nth
      element from the input list. Each worker thus has a similar composition
      of files to operate on.
      
      The result of this change is that worker processes now all tend to exit
      around the same time. The possibility of a long pole due to being
      unlucky and receiving all the large files has been mitigated. Overall
      execution time seems to drop, but not by a statistically significant
      amount on mozilla-central. However, repositories with directories
      containing many large files will likely show a drop.
      
      There shouldn't be any regressions due to partial manifest decoding
      because the update code already iterates the manifest to determine
      what files to operate on, so the manifest should already be decoded.
      f8efc8a3a991
  10. Feb 18, 2016
    • David R. MacIver's avatar
      run-tests: allow run-tests.py to run tests outside current directory · 2836a43c7722
      David R. MacIver authored
      When reloading tests, run-tests.py was assuming that it could look
      up the test by the basename, which only works if you are running
      tests which are in the current directory.
      
      This patch changes that lookup to use the full path. This is all
      that was needed, and does not appear to cause any problems for
      any of the existing testing work flows based on running the
      suggested commands at the top of run-tests.py.
      
      Motivation: In order to test Mercurial with Hypothesis (according
      to https://www.mercurial-scm.org/wiki/HypothesisPlan) it is
      useful to be able to generate temporary test files and execute
      them. Generating temporary files in the tests/ directory leads to
      a lot of suboptimal clutter.
      2836a43c7722
  11. Feb 16, 2016
  12. Feb 12, 2016
  13. Feb 06, 2016
    • Yuya Nishihara's avatar
      demandimport: blacklist sqlalchemy.events as it has side effects (issue5085) · 9ff7261cc0f5
      Yuya Nishihara authored
      Importing sqlalchemy.events cannot be delayed as it registers classes to
      their event mechanism. It worked fine before 4f1144c3c72b, since they use
      new-style imports. But now we have to blacklist it because our demandimport
      can handle new-style imports.
      
      This patch series isn't intended for stable as we don't guarantee API
      compatibility with 3rd-party extensions. They can temporarily disable the
      demand importer to work around the issue.
      9ff7261cc0f5
    • Yuya Nishihara's avatar
      demandimport: enforce ignore list while processing modules in fromlist · c25e3fd38ff1
      Yuya Nishihara authored
      If a module is loaded as "from . import x" form, there has been no way to
      disable demand loading for that module because name is ''. This patch makes
      it possible to prevent demand loading by '<package-name>.x'.
      
      We don't use _hgextimport(_origimport) here since attr is known to be a
      sub-module name. Adding hgext_ to attr wouldn't make sense.
      c25e3fd38ff1
  14. Feb 16, 2016
  15. Jan 21, 2016
  16. Feb 17, 2016
    • Matt Anderson's avatar
      progress: display progress bar when HGPLAINEXCEPT contains "progress" · 2d20d1d2ea76
      Matt Anderson authored
      This patch changes "progress.shouldprint()" so a feature name is provided to
      "ui.plain()" to determine if there is an exception specificed in HGPLAINEXCEPT
      for the progress extension.
      
      This will allow user-facing scripts to provide progress output while HGPLAIN
      is enabled.
      2d20d1d2ea76
    • timeless's avatar
      run-tests: stop allocating HGPORT3+HGPORT4 · bc010fcd836b
      timeless authored
      The only consumer was test-treemanifest.t, which has been fixed.
      
      In general, you should be able to use killdaemons.py to recycle
      ports instead of going over 3 ports (HGPORT, HGPORT1, HGPORT2).
      
      In the future, if you want to add a port, be sure to change
      portneeded in _getport.
      bc010fcd836b
    • timeless's avatar
      run-tests: refactor port allocation into functions · 1b07331f5900
      timeless authored
      Adding a port reservation was too hard and someone did it wrong.
      By refactoring, such reservations can be managed more safely.
      
      This also adds documentation so that the next person who tries
      is more likely to update all the places correctly.
      
      Note that in this commit the reservation and consumers do not
      match, that will be fixed in the next commit.
      1b07331f5900
    • timeless's avatar
      tests: put test-treemanifest.t on a port diet · 1a943a3a78ea
      timeless authored
      test-treemanifest.t had introduced HGPORT3 and HGPORT4,
      which were improperly added to run-tests.py.
      
      It also was not using HGPORT1.
      This recycles HGPORT, and shifts everything into HGPORT1 + HGPORT2.
      1a943a3a78ea
    • Jun Wu's avatar
      chg: pass sensitive command line flags to server · 66f6dad20c19
      Jun Wu authored
      We are going to make chgserver load repo config, remember what it is, and
      load repo config again to detect config change. This is the first step that
      passes config, repo, cwd options to server. Traceback is passed as well to
      cover errors before hitting chgserver.runcommand.
      66f6dad20c19
    • Jun Wu's avatar
      chg: use mallocx and reallocx in hgclient · c6e0c2533e5f
      Jun Wu authored
      This patch simplifies the code a bit, and reduces the binary size a little.
      c6e0c2533e5f
    • Jun Wu's avatar
      chg: add utility functions mallocx, reallocx · c6705c6303dd
      Jun Wu authored
      They are like malloc and realloc but will abort the program on error.
      A lot of places use {m,re}alloc and check their results. This patch
      can simplify them.
      c6705c6303dd
  17. Feb 15, 2016
    • Gregory Szorc's avatar
      localrepo: move new repo requirements into standalone function (API) · ad11edefa7c4
      Gregory Szorc authored
      This patch extracts the code for determining requirements for a new
      repo into a standalone function. By doing so, future code that will
      perform an in-place repository upgrade (e.g. to generaldelta) can
      examine the set of proposed new requirements and possibly take
      additional actions (such as adding dotencode or fncache) when
      performing the upgrade.
      
      This patch is marked as API because _baserequirements (which was added
      in b090601a80d1 so extensions could override it) has been removed and
      will presumably impact whatever extension it was added for. Consumers
      should be able to monkeypatch the new function to achieve the same
      functionality.
      
      The "create" argument has been dropped because the function is only
      called in one location and "create" is always true in that case.
      
      While it makes logical sense for this code to be a method so extensions
      can implement a custom repo class / method to override it, this won't
      actually work. This is because requirements determination occurs during
      localrepository.__init__ and this is before the "reposetup"
      "callback" is fired. So, the only way for extensions to customize
      requirements would be to overwrite localrepo.localrepository or to
      monkeypatch a function on a module during extsetup(). Since we try to
      keep localrepository small, we use a standalone function. There is
      probably room to offer extensions a "hook" point to alter repository
      creation. But that is scope bloat.
      ad11edefa7c4
    • Gregory Szorc's avatar
      localrepo: isolate requirements determination from side effects · 5d3495e394d5
      Gregory Szorc authored
      In preparation for moving requirements determination to its own
      function.
      5d3495e394d5
  18. Feb 13, 2016
  19. Feb 09, 2016
    • Pierre-Yves David's avatar
      destutil: ensure we offer 'hg update' hint when not at head in all cases · 3324345a498e
      Pierre-Yves David authored
      In the merge case, we abort if the working copy is not at head, offering to
      run 'hg update' in the hint instead. In the rebase case, we do not abort in that
      case. Yet if no rebase destination are found, it still make sense to hint the
      user about running 'hg update'. So we re-introduce a conditional using this
      branch in the 'onheadcheck == False' case.
      
      This will get used on rebase use this function.
      3324345a498e
  20. Feb 15, 2016
    • Jun Wu's avatar
      chg: forward umask from client to server · 098cb7bd46a7
      Jun Wu authored
      This is necessary to make chg test pass on test-inherit-mode.t.
      098cb7bd46a7
    • Jun Wu's avatar
      chgserver: add setumask method · d2d04d1d2f92
      Jun Wu authored
      Before this patch, the server won't inherit umask from the client, which
      will fail test-inherit-mode.t. This patch provides a way for the client
      to change umask of the server, similar to chdir and setenv.
      d2d04d1d2f92
  21. Feb 16, 2016
  22. Feb 15, 2016
  23. Feb 16, 2016
    • Jun Wu's avatar
      commandserver: add _readstr and _readlist · 75f586a1bf55
      Jun Wu authored
      Reading a string or a list are common operations for commandserver and
      chgserver. This patch adds _readstr and _readlist to avoid duplication.
      75f586a1bf55
  24. Feb 10, 2016
    • Jun Wu's avatar
      extensions: add notloaded method to return extensions failed to load · 7f430b2ac7fd
      Jun Wu authored
      Before this patch, there is no easy way to detect if there are extensions
      failed to load. While this is okay for most situations, chgserver is designed
      to preload all extensions specified in config and does need the information.
      This patch adds extensions.notloaded() to return names of extensions failed
      to load.
      7f430b2ac7fd
  25. Feb 15, 2016
Loading