head 1.3; access; symbols pkgsrc-2020Q4:1.2.0.4 pkgsrc-2020Q4-base:1.2 pkgsrc-2020Q3:1.2.0.2 pkgsrc-2020Q3-base:1.2 pkgsrc-2020Q2:1.1.0.2 pkgsrc-2020Q2-base:1.1; locks; strict; comment @# @; 1.3 date 2021.02.04.23.15.33; author wiz; state dead; branches; next 1.2; commitid P324OOfjowHaRrGC; 1.2 date 2020.08.03.21.52.55; author joerg; state Exp; branches; next 1.1; commitid pXt2zlUNlDkqlFiC; 1.1 date 2020.05.24.01.16.26; author joerg; state Exp; branches; next ; commitid eP9odNz0Z2qLMq9C; desc @@ 1.3 log @py-mercurial: update to 5.7 == New Features == * There is a new config section for templates used by hg commands. It is called `[command-templates]`. Some existing config options have been deprecated in favor of config options in the new section. These are: `ui.logtemplate` to `command-templates.log`, `ui.graphnodetemplate` to `command-templates.graphnode`, `ui.mergemarkertemplate` to `command-templates.mergemarker`, `ui.pre-merge-tool-output-template` to `command-templates.pre-merge-tool-output`. * There is a new set of config options for the template used for the one-line commit summary displayed by various commands, such as `hg rebase`. The main one is `command-templates.oneline-summary`. That can be overridden per command with `command-templates.oneline-summary.`, where `` can be e.g. `rebase`. As part of this effort, the default format from `hg rebase` was reorganized a bit. * `hg strip`, from the strip extension, is now a core command, `hg debugstrip`. The extension remains for compatibility. * `hg diff` and `hg extdiff` now support `--from ` and `--to ` arguments as clearer alternatives to `-r `. `-r ` has been deprecated. * The memory footprint per changeset during pull/unbundle operations has been further reduced. * There is a new internal merge tool called `internal:mergediff` (can be set as the value for the `merge` config in the `[ui]` section). It resolves merges the same was as `internal:merge` and `internal:merge3`, but it shows conflicts differently. Instead of showing 2 or 3 snapshots of the conflicting pieces of code, it shows one snapshot and a diff. This may be useful when at least one side of the conflict is similar to the base. The new marker style is also supported by "premerge" as `merge-tools..premerge=keep-mergediff`. * External hooks are now called with `HGPLAIN=1` preset. This has the side effect of ignoring aliases, templates, revsetaliases, and a few other config options in any `hg` command spawned by the hook. The previous behavior can be restored by setting HGPLAINEXCEPT appropriately in the parent process. See `hg help environment` for the list of items, and how to set it. * The `branchmap` cache is updated more intelligently and can be significantly faster for repositories with many branches and changesets. == New Experimental Features == * `experimental.single-head-per-branch:public-changes-only` can be used restrict the single head check to public revision. This is useful for overlay repository that have both a publishing and non-publishing view of the same storage. == Backwards Compatibility Changes == * `--force-lock` and `--force-wlock` options on `hg debuglock` command are renamed to `--force-free-lock` and `--force-free-wlock` respectively. @ text @$NetBSD: patch-D8480,v 1.2 2020/08/03 21:52:55 joerg Exp $ # HG changeset patch # User Joerg Sonnenberger # Date 1587738964 -7200 # Fri Apr 24 16:36:04 2020 +0200 # Branch stable # Node ID 8467bb8885f5468abba2ed57d3476d04fd8fb426 # Parent edffab2cf0ead5140fdaa391c1c827ddc53dfe35 bundle: make obsolescence parts optional It is useful to ship obsolescence markers as part of clonebundles or pullbundles, but they shouldn't stop a non-evolution client from working. Marking the part as optional is enough to ensure this. This does not affect dynamically created bundles part of the regular pull/push exchange. Adjust existing test case coverage to ensure this is visible. Differential Revision: https://phab.mercurial-scm.org/D8480 diff -r edffab2cf0ea -r 8467bb8885f5 mercurial/bundle2.py --- mercurial/bundle2.py Tue May 12 22:20:56 2020 +0200 +++ mercurial/bundle2.py Fri Apr 24 16:36:04 2020 +0200 @@@@ -1729,7 +1729,7 @@@@ if opts.get(b'obsolescence', False): obsmarkers = repo.obsstore.relevantmarkers(outgoing.missing) - buildobsmarkerspart(bundler, obsmarkers) + buildobsmarkerspart(bundler, obsmarkers, False) if opts.get(b'phases', False): headsbyphase = phases.subsetphaseheads(repo, outgoing.missing) @@@@ -1852,7 +1852,7 @@@@ part.addparam(b'requirements', requirements, mandatory=True) -def buildobsmarkerspart(bundler, markers): +def buildobsmarkerspart(bundler, markers, mandatory): """add an obsmarker part to the bundler with No part is created if markers is empty. @@@@ -1866,7 +1866,7 @@@@ if version is None: raise ValueError(b'bundler does not support common obsmarker format') stream = obsolete.encodemarkers(markers, True, version=version) - return bundler.newpart(b'obsmarkers', data=stream) + return bundler.newpart(b'obsmarkers', data=stream, mandatory=mandatory) def writebundle( diff -r edffab2cf0ea -r 8467bb8885f5 mercurial/exchange.py --- mercurial/exchange.py Tue May 12 22:20:56 2020 +0200 +++ mercurial/exchange.py Fri Apr 24 16:36:04 2020 +0200 @@@@ -1157,7 +1157,7 @@@@ pushop.stepsdone.add(b'obsmarkers') if pushop.outobsmarkers: markers = obsutil.sortedmarkers(pushop.outobsmarkers) - bundle2.buildobsmarkerspart(bundler, markers) + bundle2.buildobsmarkerspart(bundler, markers, True) @@b2partsgenerator(b'bookmarks') @@@@ -2615,7 +2615,7 @@@@ subset = [c.node() for c in repo.set(b'::%ln', heads)] markers = repo.obsstore.relevantmarkers(subset) markers = obsutil.sortedmarkers(markers) - bundle2.buildobsmarkerspart(bundler, markers) + bundle2.buildobsmarkerspart(bundler, markers, True) @@getbundle2partsgenerator(b'phases') diff -r edffab2cf0ea -r 8467bb8885f5 tests/test-obsolete-bundle-strip.t --- tests/test-obsolete-bundle-strip.t Tue May 12 22:20:56 2020 +0200 +++ tests/test-obsolete-bundle-strip.t Fri Apr 24 16:36:04 2020 +0200 @@@@ -1444,3 +1444,35 @@@@ # unbundling: new changesets 9ac430e15fca (1 drafts) # unbundling: (1 other changesets obsolete on arrival) # unbundling: (run 'hg update' to get a working copy) + +Test that obsolescence markers in bundles are ignored if unsupported + + $ hg init repo-with-obs + $ cd repo-with-obs + $ hg debugbuilddag +1 + $ hg debugobsolete `getid 0` + 1 new obsolescence markers + obsoleted 1 changesets + $ hg bundle --config experimental.evolution.bundle-obsmarker=true --all --hidden bundle-with-obs + 1 changesets found + $ cd .. + $ hg init repo-without-obs + $ cd repo-without-obs + $ hg --config experimental.evolution=False unbundle ../repo-with-obs/bundle-with-obs --debug + bundle2-input-bundle: 1 params with-transaction + bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported + adding changesets + add changeset 1ea73414a91b + adding manifests + adding file changes + bundle2-input-part: total payload size 190 + bundle2-input-part: "cache:rev-branch-cache" (advisory) supported + bundle2-input-part: total payload size 39 + bundle2-input-part: "obsmarkers" (advisory) supported + bundle2-input-part: total payload size 50 + ignoring obsolescence markers, feature not enabled + bundle2-input-bundle: 3 parts total + updating the branch cache + added 1 changesets with 0 changes to 0 files + new changesets 1ea73414a91b (1 drafts) + (run 'hg update' to get a working copy) diff -r edffab2cf0ea -r 8467bb8885f5 tests/test-obsolete-changeset-exchange.t --- tests/test-obsolete-changeset-exchange.t Tue May 12 22:20:56 2020 +0200 +++ tests/test-obsolete-changeset-exchange.t Fri Apr 24 16:36:04 2020 +0200 @@@@ -103,7 +103,7 @@@@ changegroup -- {nbchanges: 1, version: 02} (mandatory: True) f89bcc95eba5174b1ccc3e33a82e84c96e8338ee cache:rev-branch-cache -- {} (mandatory: False) - obsmarkers -- {} (mandatory: True) + obsmarkers -- {} (mandatory: False) version: 1 (70 bytes) 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r edffab2cf0ea -r 8467bb8885f5 tests/test-obsolete-distributed.t --- tests/test-obsolete-distributed.t Tue May 12 22:20:56 2020 +0200 +++ tests/test-obsolete-distributed.t Fri Apr 24 16:36:04 2020 +0200 @@@@ -138,14 +138,42 @@@@ $ hg up 'desc("ROOT")' 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ hg pull --confirm --config ui.interactive=True << EOF + $ hg pull --debug --confirm --config ui.interactive=True << EOF > n > EOF pulling from $TESTTMP/distributed-chain-building/server + query 1; heads searching for changes + taking quick initial sample + query 2; still undecided: 1, sample size is: 1 + 2 total queries in *.*s (glob) + 1 changesets found + list of changesets: + 391a2bf12b1b8b05a72400ae36b26d50a091dc22 + listing keys for "bookmarks" + bundle2-output-bundle: "HG20", 5 parts total + bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload + bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload + bundle2-output-part: "obsmarkers" streamed payload + bundle2-output-part: "phase-heads" 48 bytes payload + bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload + bundle2-input-bundle: with-transaction + bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported adding changesets + add changeset 391a2bf12b1b adding manifests adding file changes + adding c_B1 revisions + bundle2-input-part: total payload size 485 + bundle2-input-part: "listkeys" (params: 1 mandatory) supported + bundle2-input-part: "obsmarkers" supported + bundle2-input-part: total payload size 143 + bundle2-input-part: "phase-heads" supported + bundle2-input-part: total payload size 48 + bundle2-input-part: "cache:rev-branch-cache" (advisory) supported + bundle2-input-part: total payload size 39 + bundle2-input-bundle: 5 parts total + checking for updated bookmarks adding 1 changesets with 1 changes to 1 files (+1 heads) 1 new obsolescence markers obsoleting 1 changesets diff -r edffab2cf0ea -r 8467bb8885f5 tests/test-obsolete.t --- tests/test-obsolete.t Tue May 12 22:20:56 2020 +0200 +++ tests/test-obsolete.t Fri Apr 24 16:36:04 2020 +0200 @@@@ -1632,7 +1632,7 @@@@ e016b03fd86fcccc54817d120b90b751aaf367d6 b0551702f918510f01ae838ab03a463054c67b46 cache:rev-branch-cache -- {} (mandatory: False) - obsmarkers -- {} (mandatory: True) + obsmarkers -- {} (mandatory: False) version: 1 (92 bytes) e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} phase-heads -- {} (mandatory: True) @ 1.2 log @Belatedly update patch to not fail test suite. @ text @d1 1 a1 1 $NetBSD: patch-D8480,v 1.1 2020/05/24 01:16:26 joerg Exp $ @ 1.1 log @Merge a number of patches already committed or under review for issues found in the NetBSD deployment. Bump revision. @ text @d1 1 a1 1 $NetBSD$ d139 1 a139 1 + 2 total queries in 0.0091s @