Skip to content
Snippets Groups Projects
  1. Apr 12, 2019
  2. Apr 16, 2019
  3. Apr 15, 2019
  4. Apr 14, 2019
  5. Apr 13, 2019
    • Martin von Zweigbergk's avatar
      copies: don't include copies that are not in source in directory move · 31abb9d713af
      Martin von Zweigbergk authored
      I've been working on a rewrite of mergecopies(). I compared the output
      of the rewritten version with the current version. I noticed that
      between FIREFOX_NIGHTLY_59_END and FIREFOX_BETA_60_BASE in the
      mozilla-unified repo, there were many copies that the current version
      detected that the rewritten version did not. One example was
      js/src/gc/Iteration.h -> js/src/gc/PublicIterators.h. Then I realized
      that js/src/gc/Iteration.h doesn't even exist in
      FIREFOX_NIGHTLY_59_END.
      
      This patch adds a filtering step for the "fullcopy" dict. It turns out
      that that change also affects the test for issue5020 in
      test-merge-criss-cross.t. The 'dm' action no longer happens there. At
      first I thought that the test case change meant that this patch was
      broken, but I think it's actually correct tha the 'dm' action should
      not happen there. The result of the bid merge is still the same.
      
      I suspect this filtering is a better solution for the issue than
      41f6af50c0d8 (merge: fix crash on criss cross merge with dir move and
      delete (issue5020), 2017-01-31). I also suspect that it was broken
      just a few months earlier by a005c33d0bd7 (mergecopies: add logic to
      process incomplete data, 2016-10-04). Note that bid merge had been
      enabled for a few years at that point, since 19903277f035 (merge: use
      bid merge by default (BC), 2014-10-01).
      
      This patch is still just a workaround. It will be cleaned up soon
      (with the rewrite of mergecopies()). But doing this in a separate
      patch makes later patches easier to understand and gives a place to
      explain why this is changing.
      
      Differential Revision: https://phab.mercurial-scm.org/D6244
      31abb9d713af
    • Martin von Zweigbergk's avatar
      tests: add test for issue5343 (grafting with copies) · 7815cf0ea88b
      Martin von Zweigbergk authored
      It seems that issue5353 resulted in a lot of tests in test-graft.t,
      but the bug actually reported in that issue didn't get a test
      case. This patch adds one for the "move" and one for the "copy"
      version of it. I also added a "copy+modify" case, to show what should
      be a merge conflict. I didn't add one for the "backwards" version of
      it since the comment says that that was already covered by previous
      work.
      
      The tests added by this patch show the broken behavior (the bug is
      still open). I suspect the results returned from mergecopies() are not
      expressive enough to fix this issue: it has a dict for copies to merge
      with, but that can only give one more filename, but here we need two
      (one for the path on the remote side and one for the path in the merge
      base). I want to have it tested anyway since I'm about to refactor
      mergecopies().
      
      Differential Revision: https://phab.mercurial-scm.org/D6242
      7815cf0ea88b
  6. Apr 16, 2019
    • Jordi Gutiérrez Hermoso's avatar
      chistedit: use context manager to set verbose ui · 9e40c5892714
      Jordi Gutiérrez Hermoso authored
      I'm still not exactly sure why this is necessary -- perhaps setting it
      unconditionally would leak this setting in chg invocations.
      Regardless, this would have looked very out of place as compared to
      how this setting is done everywhere else, so at least for the sake of
      style, let's be consistent with the rest of the codebase.
      9e40c5892714
    • Pierre-Yves David's avatar
      setdiscovery: stop limiting the number of local head we initially send · 4f9a89837f07
      Pierre-Yves David authored
      In our testing this limitation provides now real gain and instead triggers
      pathological discovery timing for some repository with many heads.
      
      See inline documentation for details.
      
      Some timing below:
      
      Mozilla try repository, (~1M revs, ~35K heads), discovery between 2 clones with
      100 head missing on each side
      
      before:
      ! wall 1.492111 comb 1.490000 user 1.450000 sys 0.040000 (best of 20)
      ! wall 1.813992 comb 1.820000 user 1.700000 sys 0.120000 (max of 20)
      ! wall 1.574326 comb 1.573500 user 1.522000 sys 0.051500 (avg of 20)
      ! wall 1.572583 comb 1.570000 user 1.520000 sys 0.050000 (median of 20)
      
      after:
      ! wall 1.147834 comb 1.150000 user 1.090000 sys 0.060000 (best of 20)
      ! wall 1.449144 comb 1.450000 user 1.330000 sys 0.120000 (max of 20)
      ! wall 1.204618 comb 1.202500 user 1.146500 sys 0.056000 (avg of 20)
      ! wall 1.194407 comb 1.190000 user 1.140000 sys 0.050000 (median of 20)
      
      
      pypy (~100 heads, 317 heads) discovery between clones with only 42 common heads
      
      before:
      ! wall 0.031653 comb 0.030000 user 0.030000 sys 0.000000 (best of 25)
      ! wall 0.055719 comb 0.050000 user 0.040000 sys 0.010000 (max of 25)
      ! wall 0.038939 comb 0.039600 user 0.038400 sys 0.001200 (avg of 25)
      ! wall 0.038660 comb 0.050000 user 0.040000 sys 0.010000 (median of 25)
      
      after:
      ! wall 0.018754 comb 0.020000 user 0.020000 sys 0.000000 (best of 49)
      ! wall 0.034505 comb 0.040000 user 0.030000 sys 0.010000 (max of 49)
      ! wall 0.019631 comb 0.019796 user 0.018367 sys 0.001429 (avg of 49)
      ! wall 0.019132 comb 0.020000 user 0.020000 sys 0.000000 (median of 49)
      
      
      Private repository (~1M revs, ~3K heads), discovery from a strip subset, about
      100 changesets to be pulled.
      
      before:
      ! wall 1.837729 comb 1.840000 user 1.790000 sys 0.050000 (best of 20)
      ! wall 2.203468 comb 2.200000 user 2.100000 sys 0.100000 (max of 20)
      ! wall 2.049355 comb 2.048500 user 2.002500 sys 0.046000 (avg of 20)
      ! wall 2.035315 comb 2.040000 user 2.000000 sys 0.040000 (median of 20)
      
      after:
      ! wall 0.136598 comb 0.130000 user 0.110000 sys 0.020000 (best of 20)
      ! wall 0.330519 comb 0.330000 user 0.260000 sys 0.070000 (max of 20)
      ! wall 0.157254 comb 0.155500 user 0.123000 sys 0.032500 (avg of 20)
      ! wall 0.149870 comb 0.140000 user 0.110000 sys 0.030000 (median of 20)
      
      
      Same private repo, discovery between two clone with 500 different heads on each
      side:
      
      before:
      ! wall 2.372919 comb 2.370000 user 2.320000 sys 0.050000 (best of 20)
      ! wall 2.622422 comb 2.610000 user 2.510000 sys 0.100000 (max of 20)
      ! wall 2.450135 comb 2.450000 user 2.402000 sys 0.048000 (avg of 20)
      ! wall 2.443896 comb 2.450000 user 2.410000 sys 0.040000 (median of 20)
      
      after:
      ! wall 0.625497 comb 0.620000 user 0.570000 sys 0.050000 (best of 20)
      ! wall 0.834723 comb 0.820000 user 0.730000 sys 0.090000 (max of 20)
      ! wall 0.675725 comb 0.675500 user 0.628000 sys 0.047500 (avg of 20)
      ! wall 0.671614 comb 0.680000 user 0.640000 sys 0.040000 (median of 20)
      4f9a89837f07
  7. Apr 17, 2019
    • Pierre-Yves David's avatar
      peer: introduce a limitedarguments attributes · 69921d02daaf
      Pierre-Yves David authored
      When set to True, it signal that the peer cannot receive too larges arguments
      and that algorithm must adapt. This should only be True for http peer that does
      not support argument passed as "post".
      
      This will be useful to unlock better discovery performance in the next
      changesets.
      
      I am using a dedicated argument because this is not really a usual
      "capabilities" things. An alternative approach would be to adds a
      "large-arguments" to all peer, but the http peers. That seemed a bit too hacky
      to me.
      69921d02daaf
  8. Mar 06, 2019
    • Pierre-Yves David's avatar
      verify: also check full manifest validity during verify runs · 7755b89cadaf
      Pierre-Yves David authored
      Before this changes, `hg verify` only checked if a manifest revision existed and
      referenced the proper files. However it never checked the manifest revision
      content itself.
      
      Mercurial is expecting manifest entries to be sorted and will crash otherwise.
      Since `hg verify` did not attempted a full restoration of manifest entry, it
      could ignore this kind of corruption.
      
      This new check significantly increases the cost of a `hg verify` run. This
      especially affects large repository not using `sparse-revlog`. For now, this is
      hidden behind the `--full` experimental flag.
      7755b89cadaf
  9. Apr 16, 2019
    • Pierre-Yves David's avatar
      verify: introduce an experimental --full flag · 496ac8a02380
      Pierre-Yves David authored
      The flag currently has no effect, see next changeset for details. We introduce
      the flag as experimental to keep the freedom of changing our mind on the final
      UI.
      
      Note: this patch highlight a small but in `hg help`. An option section is
      generated even if no option are visible.
      496ac8a02380
    • Pierre-Yves David's avatar
      verify: introduce a notion of "level" · 57539e5ea2e0
      Pierre-Yves David authored
      Some checks are slower than others, to help the user to run the checks he needs,
      we are about to introduce new flag to select faster vs deeper runs. This put
      the scaffolding in place to do this.
      57539e5ea2e0
  10. Apr 14, 2019
    • Martin von Zweigbergk's avatar
      tests: split out separate test for issue5020 · f2fe7cf4ebb6
      Martin von Zweigbergk authored
      The test was added to the existing setup in 41f6af50c0d8 (merge: fix
      crash on criss cross merge with dir move and delete (issue5020),
      2017-01-31). I'm about to make a change that affects that test and
      it's much easier to follow if the test case for issue5020 is a
      separate test case. The separate test case is based on what mpm
      provided in comment 12 on the issue.
      
      `hg diff -r 41f6af50c0d8^ tests/test-merge-criss-cross.t` after this
      patch is pretty small (besides the added test). It's probably easier
      for reviewers to look at that than to try to understand the diff
      itself (I don't understand it).
      
      Differential Revision: https://phab.mercurial-scm.org/D6243
      f2fe7cf4ebb6
  11. Apr 16, 2019
  12. Apr 15, 2019
  13. Apr 14, 2019
  14. Apr 17, 2019
  15. Apr 16, 2019
    • Pierre-Yves David's avatar
      debugdiscovery: include the number of heads in all sets · 607a0de9bae3
      Pierre-Yves David authored
      We already displayed information about heads of the common set that are either
      local or remote heads. We now also do so for heads of the common set that are
      both local and remote heads too. This is useful because various step in the
      set discovery algorithm have head specific optimizations.
      607a0de9bae3
    • Pierre-Yves David's avatar
      recover: add a --[no-]verify flag · 013de80bf90e
      Pierre-Yves David authored
      For trivial cases, the cost of the verify run after `hg recover` is getting in
      the way. In addition for very large repositories, the cost is simply too high
      to be paid, making `hg recover` an unusable commands.
      
      We introduce a --verify flag, set by default. If is automatically associated
      with a --no-verify flag that one can use to skip the verify step.
      
      We might consider changing the default behavior in the future. However this is
      out of scope for this series.
      013de80bf90e
  16. Apr 02, 2019
  17. Dec 28, 2017
    • Martin von Zweigbergk's avatar
      changelog: parse copy metadata if available in extras · 5382d8f8530b
      Martin von Zweigbergk authored
      This lets read back the copy metadata we just started writing. There
      are still many places left to teach about getting the copy information
      from the changeset, but we have enough ({file_copies}, specifically)
      that we can add it now and have some test coverage of it.
      
      Differential Revision: https://phab.mercurial-scm.org/D6186
      5382d8f8530b
    • Martin von Zweigbergk's avatar
      copies: add config option for writing copy metadata to file and/or changset · 0e41f40b01cc
      Martin von Zweigbergk authored
      This introduces a config option that lets you choose to write copy
      metadata to the changeset extras instead of to filelog. There's also
      an option to write it to both places. I imagine that may possibly be
      useful when transitioning an existing repo.
      
      The copy metadata is stored as two fields in extras: one for copies
      since p1 and one for copies since p2.
      
      I may need to add more information later in order to make copy tracing
      faster. Specifically, I'm thinking out recording which files were
      added or removed so that copies._chaincopies() doesn't have to look at
      the manifest for that. But that would just be an optimization and that
      can be added once we know if it's necessary.
      
      I have also considered saving space by using replacing the destination
      file path by an index into the "files" list, but that can also be
      changed later (but before the feature is ready to release).
      
      Differential Revision: https://phab.mercurial-scm.org/D6183
      0e41f40b01cc
  18. Apr 04, 2019
  19. Apr 12, 2019
    • Pierre-Yves David's avatar
      repoview: flag `server.view` as experimental · 08481e11462e
      Pierre-Yves David authored
      Ideally, the non-experimental version of `experimental.extra-filter-revs` will
      cover the use case for `server.view=immutable` well enough than having to have
      this dedicated configuration. Since `server.view` is not part of any release, I
      would prefer to have it marked as experimental to avoid having it to support it
      for ever.
      08481e11462e
    • Pierre-Yves David's avatar
      repoview: move subsettable in a dedicated module · caebe5e7f4bd
      Pierre-Yves David authored
      The dictionary got moved in `branchmap` to avoid import cycle. However, we are
      about to needs it in repoview too. So we introduce a now module to define that
      that mapping.
      caebe5e7f4bd
  20. Feb 01, 2019
  21. Mar 27, 2019
    • Pierre-Yves David's avatar
      compression: introduce an official `zstd-revlog` requirement · 10a6725dca6e
      Pierre-Yves David authored
      This requirement supersedes `exp-compression-zstd`. However, we keep support for
      the old requirement.
      
      Strictly speaking, we do not need to add a new requirement, there are no logic
      change making "new" repo incompatible with mercurial client using a version
      that support `exp-compression-zstd`.
      
      The choice to introduce a new requirement is motivated by the following:
      
      * The previous requirement was explicitly "experimental". Using it by default
        could confuse users.
      
      * adding support for a hypothetical third compression engine will requires new
        code, and will comes with its own requirement tool.
      
      * We won't use it as the default for a while since I do not think we support
        zstd on all platform. I can imagine we'll gain another (unrelated but on my
        default) requirement by the time we turn this zstd by default.
      10a6725dca6e
  22. Apr 16, 2019
  23. Apr 15, 2019
  24. Apr 16, 2019
  25. Apr 05, 2019
    • Pierre-Yves David's avatar
      pull: improved message issued in case of failed update · a362b0b95e42
      Pierre-Yves David authored
      When running `hg pull --update`, the update step may fail. Nothing in the error
      message help to understand the abort is related to the secondary step (update)
      instead of the primary step (pull).
      
      We now add some information to the error message to clarify it comes from the
      update part. It is useful in various situation (uncommitted changes blocking the
      update, update to hidden destination, etc...)
      
      The pull output is updated from:
      
        $ hg pull ../repo-Bob --rev 956063ac4557 --update
        pulling from ../repo-Bob
        searching for changes
        adding changesets
        adding manifests
        adding file changes
        added 2 changesets with 0 changes to 2 files (+1 heads)
        (2 other changesets obsolete on arrival)
        abort: filtered revision '6'!
      
      to:
      
        $ hg pull ../repo-Bob --rev 956063ac4557 --update
        pulling from ../repo-Bob
        searching for changes
        adding changesets
        adding manifests
        adding file changes
        added 2 changesets with 0 changes to 2 files (+1 heads)
        (2 other changesets obsolete on arrival)
        abort: cannot update to target: filtered revision '6'!
      
      (I am not sure why the actual error, "filtered revision '6'", is not using the
      more modern format mentioning the obsolescence fate of '6')
      a362b0b95e42
    • Pierre-Yves David's avatar
      pull: deal with locally filtered changeset passed into --rev · 232a33a11ce0
      Pierre-Yves David authored
      Nowadays, it is possible to explicitly pull a remote revision that end up being
      hidden locally (eg: obsoleted locally). However before this patch, some
      internal processing where crashing trying to resolve a filtered revision.
      
      Without this patches, the pull output result a confusing output:
      
        $ hg pull ../repo-Bob --rev 956063ac4557
        pulling from ../repo-Bob
        searching for changes
        adding changesets
        adding manifests
        adding file changes
        added 2 changesets with 0 changes to 2 files (+1 heads)
        (2 other changesets obsolete on arrival)
        abort: 00changelog.i@956063ac4557828781733b2d5677a351ce856f59: filtered node!
      232a33a11ce0
  26. Apr 16, 2019
  27. Apr 04, 2019
    • Pierre-Yves David's avatar
      repoview: keep the branchmap cache for the `served.hidden` view warm · 70b71421fd33
      Pierre-Yves David authored
      For the same reason we want to keep the cache for the `served` view up to date,
      we want to also keep the `served.hidden` view up to date. If some processes with
      a readonly access to the repo needs to access it, we better have the cache warm
      to avoid computing the same data over and over and over.
      
      In most case (no secret changesets), the "served" and "served.hidden" set will
      be identical and no cache will actually have to be updated.
      70b71421fd33
  28. May 21, 2018
    • Pierre-Yves David's avatar
      repoview: introduce a filter for serving hidden changesets · ef0e3cc684b3
      Pierre-Yves David authored
      There are multiple usecase for being able to explicitly view or pull obsolete
      from a server. We need to be able to do so without exposing the secret
      changesets. We introduces a dedicated repository "view" to do so. Way to expose
      this "view" to the user will come later.
      
      To keep a behavior consistent with expected client/server behavior, the general
      idea is for the obsolete access to be explicitly requested by the code
      generating the request. In addition, the will be server side configuration to
      restrict the access to this feature.
      ef0e3cc684b3
  29. Apr 13, 2019
  30. Apr 05, 2019
Loading