Skip to content
Snippets Groups Projects
  1. Feb 22, 2025
  2. Nov 28, 2024
  3. Dec 11, 2023
    • Pierre-Yves David's avatar
      changelog: never inline changelog · dcaa2df1f688
      Pierre-Yves David authored
      The test suite mostly use small repositories, that implies that most changelog in the
      tests are inlined. As a result, non-inlined changelog are quite poorly tested.
      Since non-inline changelog are most common case for serious repositories, this
      lack of testing is a significant problem that results in high profile issue like
      the one recently fixed by 66417f55ea33 and 849745d7da89.
      
      Inlining the changelog does not bring much to the table, the number of total
      file saved is negligible, and the changelog will be read by most operation
      anyway.
      
      So this changeset is make it so we never inline the changelog, and de-inline the
      one that are still inlined whenever we touch them.
      
      By doing that, we remove the "dual code path" situation for writing new entry to
      the changelog and move to a "single code path" situation. Having a single
      code path simplify the code and make sure it is covered by test (if test cover
      that situation obviously)
      
      
      This impact all tests that care about the number of file and the exchange size,
      but there is nothing too complicated in them just a lot of churn.
      
      The churn is made "worse" by the fact rust will use the persistent nodemap on
      any changelog now. Which is overall a win as it means testing the persistent
      nodemap more and having less special cases.
      
      In short, having inline changelog is mostly useless and an endless source of
      pain. We get rid of it.
      dcaa2df1f688
  4. Jul 10, 2023
  5. Mar 10, 2023
  6. Jan 04, 2023
    • Matt Harbison's avatar
      tests: drop `(py3 !)` output matching predicates · 950c39918bd2
      Matt Harbison authored
      Presumably these were paired with `(no-py3 !)` at one point, but now they were
      unconditionally true.
      
      test-check-code.t required a couple of `(glob)` markers on the changed lines in
      test-lfs-serve-access.t, because of the `$LOCALIP` usage on those lines.  Not
      sure how those lines slipped through the checks previously.
      950c39918bd2
  7. May 02, 2022
  8. Sep 22, 2022
  9. Jan 18, 2022
  10. Dec 07, 2021
  11. Aug 03, 2021
  12. Jul 09, 2021
  13. Jan 14, 2021
  14. Apr 06, 2021
  15. Mar 04, 2021
  16. Nov 23, 2020
  17. Nov 12, 2020
  18. 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
  19. Sep 08, 2019
    • Pierre-Yves David's avatar
      changegroup: move message about added changes to transaction summary · d7304434390f
      Pierre-Yves David authored
      Before that, applying multiple changegroups in the same transaction issued the
      message multiple time. This result in a confusing output:
      
          adding changesets
          adding manifests
          adding file changes
          added 32768 changesets with 60829 changes to 2668 files
          adding changesets
          adding manifests
          adding file changes
          added 8192 changesets with 16885 changes to 1553 files
          adding changesets
          adding manifests
          adding file changes
          added 1020 changesets with 1799 changes to 536 files
          adding changesets
          adding manifests
          ...
      
      Instead, we now only issue the message once at the end of the transaction,
      summing up all added changesets, changes and files. The line is identical, but
      happens sightly later in the output.
      
      There are other suboptimal behavior around issue multiple changegroup (eg:
      progress bar). We'll cover them later.
      
      This impact of lot of test as one would expect, but a two pass check show they
      are just the order change we expected.
      
      To deal with "under the hood" bundle application by internal code, we had to
      take a slightly hacky move. We could clean that up with a more official way to
      enter "under the hood" section, however I want to keep this series simple to get
      it landed. This kind of change have a very high bit rot rate since it impact a
      lot of test output.
      d7304434390f
  20. Feb 09, 2019
  21. Nov 12, 2018
  22. Oct 13, 2018
    • Matt Harbison's avatar
      tests: replace `cd ..` with an absolute path in a couple ssh tests · 52b773f5e9a4
      Matt Harbison authored
      These tests are broken under py3 on Windows to the point where the `cd ..` was
      actually escaping into the system wide $TEMP.  The subsequent `hg init` created
      a repo there, and then added a local extension to the hgrc.  This breaks every
      single subsequent test when it tries to `hg init` in its $TESTTMP, and can't
      load the localwrite.py extension.  And since I botched this the first time and
      replaced the wrong `cd ..`, this just replaces all of them.  I've noticed test
      garbage in $TEMP recently, and maybe this will help.
      
      Perhaps `hg init` shouldn't load the config for the local repo, but this is an
      easy enough workaround for now.
      52b773f5e9a4
  23. Oct 09, 2018
    • Gregory Szorc's avatar
      wireprotov2: change how revisions are specified to changesetdata · 41263df08109
      Gregory Szorc authored
      Right now, we have a handful of arguments for specifying the revisions
      whose data should be returned. Defining how all these arguments
      interact when various combinations are present is difficult.
      
      This commit establishes a new, generic mechanism for specifying
      revisions. Instead of a hodgepodge of arguments defining things, we
      have a list of dicts that specify revision selectors. The final set
      of revisions is a union of all these selectors.
      
      We implement support for specifying revisions based on:
      
      * An explicit list of changeset revisions
      * An explicit list of changeset revisions plus ancestry depth
      * A DAG range between changeset roots and heads
      
      If you squint hard enough, this problem has already been solved by
      revsets. But I'm reluctant to expose revsets to the wire protocol
      because that would require servers to implement a revset parser.
      Plus there are security and performance implications: the set
      of revision selectors needs to be narrowly and specifically tailored
      for what is appropriate to be executing on a server. Perhaps there
      would be a way for us to express the "parse tree" of a revset
      query, for example. I'm not sure. We can explore this space another
      time. For now, the new mechanism should bring sufficient flexibility
      while remaining relatively simple.
      
      The selector "types" are prefixed with "changeset" because I plan
      to add manifest and file-flavored selectors as well. This will enable
      us to e.g. select file revisions based on a range of changeset
      revisions.
      
      Differential Revision: https://phab.mercurial-scm.org/D4979
      41263df08109
  24. Sep 20, 2018
    • Gregory Szorc's avatar
      wireprotov2: allow multiple fields to follow revision maps · d059cb669632
      Gregory Szorc authored
      The *data wire protocol commands emit a series of CBOR values.
      Because revision/delta data may be large, their data is emitted
      outside the map as a top-level bytestring value.
      
      Before this commit, we'd emit a single optional bytestring
      value after the revision descriptor map. This got the job done.
      But it was limiting in that we could only send a single field.
      And, it required the consumer to know that the presence of a
      key in the map implied the existence of a following bytestring
      value.
      
      This commit changes the encoding strategy so top-level bytestring
      values in the stream are explicitly denoted in a "fieldsfollowing"
      key. This key contains an array defining what fields that follow
      and the expected size of each field.
      
      By defining things this way, we can easily send N bytestring
      values without any ambiguity about their order. In addition,
      clients only need to know how to parse ``fieldsfollowing`` to
      know if extra values are present.
      
      Because this breaks backwards compatibility, we've bumped the version
      number of the wire protocol version 2 API endpoint.
      
      Differential Revision: https://phab.mercurial-scm.org/D4620
      d059cb669632
  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. Sep 04, 2018
  28. Aug 18, 2018
    • Matt Harbison's avatar
      tests: conditionalize out tests that msys is mangling · 2dfc22620a54
      Matt Harbison authored
      This was exposed by ac0a87160012.  The paths for convert and ssh respectively
      are being turned into:
      
         $TESTTMP\bzr+ssh:\foobar@selenic.com\baz\.hg
      
         'C:\\C:\\Users\\Matt\\AppData\\Local\\Temp\\hgtests.8awa9x\\child1\\test-ssh-bundle1.t-sshv2\\nonexistent\\.hg
      
      The errno value raised is 123, and the message is
      
         The filename, directory name, or volume label syntax is incorrect
      2dfc22620a54
  29. May 20, 2018
  30. Apr 06, 2018
  31. Mar 24, 2018
  32. Apr 03, 2018
  33. Apr 04, 2018
  34. Mar 14, 2018
    • Gregory Szorc's avatar
      wireproto: nominally don't expose "batch" to version 2 wire transports · cd0ca979a8b8
      Gregory Szorc authored
      The unified frame-based protocol will (eventually) support
      multiple requests per client transmission. This means that the
      [very hacky] "batch" command has no purpose existing in this protocol.
      
      This commit marks the command as applying to v1 transports only.
      
      But because SSHv2 == SSHv1 currently, we had to hack it back in
      for the SSHv2 transport. Bleh.
      
      Tests changed because the capabilities string changed. The order of
      tokens in the string is not important.
      
      Differential Revision: https://phab.mercurial-scm.org/D2856
      cd0ca979a8b8
  35. Jan 18, 2018
    • Boris Feld's avatar
      revbranchcache: advertise and use 'rbc' exchange capability · 2090044a288d
      Boris Feld authored
      The feature is now advertised and use.
      
      Updating the branchmap cache can be very expensive (up to minutes on large
      repository) and fetching revision branch data is about 80% of that. Exchanging
      the rev branch cache over the wire really help to recover from branch map
      invalidation.
      
      (There is a good chance other in flight chance would conflict on
      test-http-bad-server.t and other. So here is a small note to help update that
      test again: capabilities=19bytes, part-107bytes)
      2090044a288d
  36. Feb 27, 2018
    • Gregory Szorc's avatar
      wireproto: don't expose changegroupsubset capability if not available · e89959970a08
      Gregory Szorc authored
      We just marked the changegroupsubset command as only available to
      version 1 of the wire transports. There is a capability of the same
      name of the command that indicates if the command is supported.
      
      This commit teaches the capabilities code to conditionally emit that
      capability depending on whether the command is available for the
      current transport.
      
      Most test output is reordering of capabilities. But the limited tests
      for version 2 of the SSH protocol do show the capability disappearing.
      
      Differential Revision: https://phab.mercurial-scm.org/D2486
      e89959970a08
Loading