Skip to content
Snippets Groups Projects
  1. May 31, 2022
  2. May 18, 2022
  3. Feb 20, 2022
  4. Jan 27, 2022
    • Pierre-Yves David's avatar
      stream-clone: allow to change persistent-nodemap format during stream clone · de3ac3d2c60b
      Pierre-Yves David authored
      Persistent nodemap affect the store format. However it is fairly isolated and
      fast to generate locally. So not making it a fixed part of the stream clone is
      useful.
      
      This allow clients without persistent-nodemap support (default for client
      without Rust enabled, or simply older client). So it make it possible to enable
      persistent nodemap on client, where it can provide a massive boost. without too
      much consequence.
      
      To do so, we stop using it in the advertisement requirements for streaming and
      let the client add/remove the necessary file depending of its configuration.
      
      We still send the files as it seems like a small save to not regenerate them.
      In addition, the way we match them will overlap with the changelog-v2/revlog-v2
      so we can't simply skip the associated patterns.
      
      Differential Revision: https://phab.mercurial-scm.org/D12096
      de3ac3d2c60b
  5. Jan 24, 2022
    • Pierre-Yves David's avatar
      requirements: add an official `REVLOG_COMPRESSION_ZSTD` const · 6fd9a17c32ab
      Pierre-Yves David authored
      Such constant was missing and its value was missing from the set of requirements
      that needs to be preserved through stream clone. This did not had any
      consequence yet as the "bundle 2 does not filter its requirements" is shadowing
      the issue.
      
      However we are now in a situation where we can fix this issue. So lets do it
      next.
      
      With the preparation work on test, changing the streamreqs value only impact two
      tests, where checking the full value seems to remains relevant.
      
      Important note: Since older version of Mercurial used the old `supportedformat`
      class attribute to check for stream requirement they supported, older version
      will consider this requirements to prevent them from using streaming clone. Even
      as they support this requirements for years. Pack for stable will be send to fix
      it, but they will have to be backported to older version if needed.
      
      Differential Revision: https://phab.mercurial-scm.org/D12083
      6fd9a17c32ab
    • Pierre-Yves David's avatar
      test-bundle: split some variant in there own section · ff0233f36f6a
      Pierre-Yves David authored
      Same rational as the previous commit about test-bundle.t. These line are quite
      volatile and having dedicated block will make their update clearer and simpler.
      
      Differential Revision: https://phab.mercurial-scm.org/D12076
      ff0233f36f6a
  6. Aug 27, 2021
  7. Aug 03, 2021
    • sliquister's avatar
      tests: rely on dummyssh being the default · 9c4204b7f3e4
      sliquister authored
      This commit is exactly the result of running this command:
      
      sed -i -e 's! *\(-e \|--ssh \|--config ui.ssh=\)[ \"]*$PYTHON[ \"]*$\(RUN\|\)TESTDIR/dummyssh[\"]* *! !g' -e '/^[ >]*ssh *=[ "]*$PYTHON[ "]*$\(RUN\|\)TESTDIR\/dummyssh[ "]*$/d' -e 's/^\(  [$] .*[^ ]\) *$/\1/' *.t *.sh
      
      Sometimes the tests can be simplified further, but I think it's
      preferable to do the simplification separately.
      
      Differential Revision: https://phab.mercurial-scm.org/D11245
      9c4204b7f3e4
  8. Jan 14, 2021
  9. Apr 06, 2021
  10. Mar 23, 2021
  11. Mar 12, 2021
  12. Mar 04, 2021
  13. Jul 06, 2020
  14. Mar 25, 2020
  15. Feb 26, 2020
    • sliquister's avatar
      exchange: turn on option that makes concurrent pushes work better · edc8504bc26b
      sliquister authored
      The motivation is simply to make hg work better out of the box.
      
      This is a slight backwards compatibility break, because client
      extensions could have assumed that the list of heads the client sees
      during discovery will be the list of heads during the entirety of the
      push. It seems unlikely to matter, and not worth mentioning.
      
      There's a fair amount of diff in tests, but this is just due to
      sending a few more bytes on the wire, except for test-acl.t.
      The extra "invalid branch cache" lines in test-acl.t don't seem to
      indicate a problem: the branchcache now get computed during the bundle
      application (because of the check:updated-heads bundle part), but
      doesn't get rolled back when transactions rollback, thus causing a
      message in the next operation computing the branch cache. Before this
      change, I assume the branchcache was only computed on transaction
      commit, so not computed at all when the transactions roll back, thus
      no messages.
      
      Differential Revision: https://phab.mercurial-scm.org/D8202
      edc8504bc26b
  16. Aug 05, 2019
    • Kyle Lippincott's avatar
      branchmap: explicitly warm+write all subsets of the branchmap caches · cdf0e9523de1
      Kyle Lippincott authored
      'full' claims it will warm all of the caches that are known about, but this was
      not the case - it did not actually warm the branchmap caches for subsets that we
      haven't requested, or for subsets that are still considered "valid". By
      explicitly writing them to disk, we can force the subsets for ex: "served" to be
      written ("immutable" and "base"), making it cheaper to calculate "served" the
      next time it needs to be updated.
      
      Differential Revision: https://phab.mercurial-scm.org/D6710
      cdf0e9523de1
  17. Mar 11, 2019
  18. Mar 14, 2019
    • Pierre-Yves David's avatar
      manifestcache: use `wcache` directory for manifest cache · e4ac7e63c213
      Pierre-Yves David authored
      The manifest full text cache is tightly related to the working copy. We should
      use the `wcache` directory for it, instead of the `cache`. Otherwise, multiple
      shares would keep overwriting each other cache entry and we loose its benefit.
      
      This is also more consistent with the fact this cache file is protected by
      `wlock`.
      e4ac7e63c213
  19. Mar 11, 2019
  20. Nov 12, 2018
  21. Oct 18, 2018
  22. Oct 13, 2018
  23. Aug 09, 2018
  24. Sep 29, 2018
  25. Sep 17, 2018
    • Anton Shestakov's avatar
      bundle2: make server.bundle2.stream default to True · 4bd6e444c76f
      Anton Shestakov authored
      Support for bundle2 streaming clones has been shipped in Mercurial 4.5
      (7eedbd5d4880), but was never activated by default. It's time to have more
      people use it. The new format allows streaming clones to transport cache
      (hooray for speed) and phaseroots (fixes phase-related issues).
      
      Changes in tests:
      
      bundle2 capabilities now have "stream=v2" (plus a '\n' as a separator) and
      therefore take 14 bytes more: "%0Astream%3Dv2". Tip for tests that have data
      encoded with CBOR: 0xd3 - 0xc5 = 14.
      
      $USUAL_BUNDLE2_CAPS$ replaces $USUAL_BUNDLE2_CAPS_SERVER$, which is the same
      thing, but without "stream=v2".
      
      Since streaming clones now also transfer caches, the reported byte and file
      counts are higher (e.g. 816 bytes in 9 files instead of 613 bytes in 4 files,
      a bit of --debug and manual math confirms that the caches take these extra 203
      bytes in 5 files).
      
      Differential Revision: https://phab.mercurial-scm.org/D4680
      4bd6e444c76f
  26. Sep 19, 2018
  27. Aug 15, 2018
  28. Aug 21, 2018
    • Gregory Szorc's avatar
      debugcommands: introduce debugrevlogindex (BC) · 828a45233036
      Gregory Szorc authored
      `hg debugindex` was originally invented for displaying revlog index
      data and is highly tailored towards that. e.g. it accepts a --format
      option to display index data for a particular revlog version and
      displays things like offset and length.
      
      As we support non-revlog storage, it makes sense for `hg debugindex`
      to display generic index data and for there to exist storage-specific
      or storage-aware debug* commands for dumping non-generic index data.
      
      This commit effectively renames `hg debugindex` to
      `hg debugrevlogindex` and replaces `hg debugindex` with a version that
      is storage agnostic.
      
      Tests using --format have been updated to use `hg debugrevlogindex`.
      
      Output is backwards compatible. The replacement command uses the
      formatter, which means output can be templatized.
      
      At some point, we may want to tweak output (e.g. to add the revision
      size). But I don't feel like taking a bigger BC break at the moment.
      
      The renamed command/function had to be moved because check-code
      enforces alphabetical ordering of commands in this file.
      
      Differential Revision: https://phab.mercurial-scm.org/D4358
      828a45233036
  29. Aug 15, 2018
    • Boris Feld's avatar
      debugrevlog: display snapshot details per depth · 9d6fab487c13
      Boris Feld authored
      This help in understanding the final structure of build manifest. All data
      about snapshot (full and intermediate) are gathered into a sub-list for
      clarity.
      
      Since we do not produce such snapshots yet, the only thing changing in test
      output is the way the information is presented.
      9d6fab487c13
  30. Jul 27, 2018
  31. Aug 15, 2018
  32. Jul 28, 2018
  33. Jul 27, 2018
    • Boris Feld's avatar
      debugrevlog: track empty revlog entries · 195ed920653e
      Boris Feld authored
      A revlog entry can be "empty" for two reasons:
      
      * the stored text is empty
      * we found another entry with the exact same content
      
      Tracking them separately make revlog content clearer.
      195ed920653e
  34. Jul 31, 2018
    • Martijn Pieters's avatar
      manifest: persist the manifestfulltext cache · 0a57945aaf7f
      Martijn Pieters authored
      Reconstructing the manifest from the revlog takes time, so much so that there
      already is a LRU cache to avoid having to load a manifest multiple times.
      
      This patch persists that LRU cache in the .hg/cache directory, so we can re-use
      this cache across hg commands. Commit benchmark (run on Macos 10.13 on a
      2017-model Macbook Pro with Core i7 2.9GHz and flash drive), testing without
      and with patch run 5 times, baseline is r2a227782e754:
      
      * committing to an existing file, against the mozilla-central repository.
        Baseline real time average 1.9692, with patch 1.3786.
      
      A new debugcommand "hg debugmanifestfulltextcache" lets you inspect the cache,
      clear it, or add specific manifest nodeids to it. When calling
      repo.updatecaches(), the manifest(s) for the working copy parents are added to
      the cache.
      
      The hg perfmanifest command has an additional --clear-disk switch to clear this
      cache when testing manifest loading performance.
      
      Using this command to test performance on the firefox repository for revision
      f947d902ed91, whose manifest has a delta chain length of 60540, we see:
      
      $ hg perfmanifest f947d902ed91 --clear-disk
      ! wall 0.972253 comb 0.970000 user 0.850000 sys 0.120000 (best of 10)
      $ hg debugmanifestfulltextcache -a `hg log --debug -r f947d902ed91 | grep manifest | cut -d: -f3`
      Cache contains 1 manifest entries, in order of most to least recent:
      id: 0294517df4aad07c70701db43bc7ff24c3ce7dbc, size 25.6 MB
      Total cache data size 25.6 MB, on-disk 0 bytes
      $ hg perfmanifest f947d902ed91
      ! wall 0.036748 comb 0.040000 user 0.020000 sys 0.020000 (best of 100)
      
      Worst-case scenario: a manifest text loaded from a single delta; in the firefox
      repository manifest node 9a1246ff762e is the chain base for the manifest
      attached to revision f947d902ed91. Loading this from a full cache file is just
      as fast as without the cache; the extra node ids ensure a big full cache:
      
      $ for node in 9a1246ff762e 1a1922c14a3e 54a31d11a36a 0294517df4aa; do
      >   hgd debugmanifestfulltextcache -a $node > /dev/null
      > done
      $ hgd perfmanifest -m 9a1246ff762e
      ! wall 0.077513 comb 0.080000 user 0.030000 sys 0.050000 (best of 100)
      $ hgd perfmanifest -m 9a1246ff762e --clear-disk
      ! wall 0.078547 comb 0.080000 user 0.070000 sys 0.010000 (best of 100)
      0a57945aaf7f
Loading