pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-mercurial



Module Name:    pkgsrc
Committed By:   joerg
Date:           Sun May 24 01:16:26 UTC 2020

Modified Files:
        pkgsrc/devel/py-mercurial: Makefile distinfo
Added Files:
        pkgsrc/devel/py-mercurial/patches: patch-D8480 patch-D8481 patch-D8487
            patch-D8490 patch-D8505 patch-D8522 patch-D8574 patch-D8575

Log Message:
Merge a number of patches already committed or under review for issues
found in the NetBSD deployment. Bump revision.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 pkgsrc/devel/py-mercurial/Makefile
cvs rdiff -u -r1.87 -r1.88 pkgsrc/devel/py-mercurial/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-mercurial/patches/patch-D8480 \
    pkgsrc/devel/py-mercurial/patches/patch-D8481 \
    pkgsrc/devel/py-mercurial/patches/patch-D8487 \
    pkgsrc/devel/py-mercurial/patches/patch-D8490 \
    pkgsrc/devel/py-mercurial/patches/patch-D8505 \
    pkgsrc/devel/py-mercurial/patches/patch-D8522 \
    pkgsrc/devel/py-mercurial/patches/patch-D8574 \
    pkgsrc/devel/py-mercurial/patches/patch-D8575

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-mercurial/Makefile
diff -u pkgsrc/devel/py-mercurial/Makefile:1.40 pkgsrc/devel/py-mercurial/Makefile:1.41
--- pkgsrc/devel/py-mercurial/Makefile:1.40     Tue May  5 12:12:47 2020
+++ pkgsrc/devel/py-mercurial/Makefile  Sun May 24 01:16:26 2020
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.40 2020/05/05 12:12:47 wiz Exp $
+# $NetBSD: Makefile,v 1.41 2020/05/24 01:16:26 joerg Exp $
 
 DISTNAME=      mercurial-${VERSION}
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    devel scm
 MASTER_SITES=  https://www.mercurial-scm.org/release/
 

Index: pkgsrc/devel/py-mercurial/distinfo
diff -u pkgsrc/devel/py-mercurial/distinfo:1.87 pkgsrc/devel/py-mercurial/distinfo:1.88
--- pkgsrc/devel/py-mercurial/distinfo:1.87     Tue May  5 12:12:47 2020
+++ pkgsrc/devel/py-mercurial/distinfo  Sun May 24 01:16:26 2020
@@ -1,6 +1,14 @@
-$NetBSD: distinfo,v 1.87 2020/05/05 12:12:47 wiz Exp $
+$NetBSD: distinfo,v 1.88 2020/05/24 01:16:26 joerg Exp $
 
 SHA1 (mercurial-5.4.tar.gz) = 652a2c61dec85f5e9eb101425861e9648bd6369a
 RMD160 (mercurial-5.4.tar.gz) = 002ccbd67bc903b7e19e470db44503e6cb37a2f2
 SHA512 (mercurial-5.4.tar.gz) = 5f92d653ab74da4696ba7f1402e6cb219c0c514a5eeecb9d7282ab95aef2c6f16d5c8e3d0149525f3dc694a133c713b671ba92327e1b0dc3ad8701d522986d8d
 Size (mercurial-5.4.tar.gz) = 7722447 bytes
+SHA1 (patch-D8480) = dca33fd25007a160cff02054ca659cce2a01511c
+SHA1 (patch-D8481) = 71dc7d12f1b892d2705dfc900faddf85a917e4c6
+SHA1 (patch-D8487) = beba279489895c9855f1ca2013c1197ef2f1d86c
+SHA1 (patch-D8490) = 96a4eefb403919d17f188573b7d1dc34cef28388
+SHA1 (patch-D8505) = 3244948bd009746941c9bdbfd5844f058c3caf59
+SHA1 (patch-D8522) = 6bc2d7b6fc40b217339b78ee2745c7ca33073642
+SHA1 (patch-D8574) = 56cecc1c83558803186e84d90ef67b4dce68f8e9
+SHA1 (patch-D8575) = 5f414acb04ba5f8c141ceada93f29f6f7d43a833

Added files:

Index: pkgsrc/devel/py-mercurial/patches/patch-D8480
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-D8480:1.1
--- /dev/null   Sun May 24 01:16:26 2020
+++ pkgsrc/devel/py-mercurial/patches/patch-D8480       Sun May 24 01:16:26 2020
@@ -0,0 +1,181 @@
+$NetBSD: patch-D8480,v 1.1 2020/05/24 01:16:26 joerg Exp $
+
+# HG changeset patch
+# User Joerg Sonnenberger <joerg%bec.de@localhost>
+# 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 <markers>
+ 
+     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 0.0091s
++  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)
Index: pkgsrc/devel/py-mercurial/patches/patch-D8481
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-D8481:1.1
--- /dev/null   Sun May 24 01:16:26 2020
+++ pkgsrc/devel/py-mercurial/patches/patch-D8481       Sun May 24 01:16:26 2020
@@ -0,0 +1,67 @@
+$NetBSD: patch-D8481,v 1.1 2020/05/24 01:16:26 joerg Exp $
+
+# HG changeset patch
+# User Joerg Sonnenberger <joerg%bec.de@localhost>
+# Date 1587751225 -7200
+#      Fri Apr 24 20:00:25 2020 +0200
+# Branch stable
+# Node ID 3d5fb6cab832475975c96b6503f66c8adb7b984c
+# Parent  ed684a82e29bbea8556c3079f6159a9159689078
+pullbundles: use unfiltered repo for head/base matching
+
+The unfiltered view works even when changeset transistion from draft to
+hidden phase. The normal visibility is already ensured by discovery as
+invisible heads would have been filtered out before. Skipping the
+filtering has a positive impact on performance, too.
+
+Differential Revision: https://phab.mercurial-scm.org/D8481
+
+diff -r ed684a82e29b -r 3d5fb6cab832 mercurial/wireprotov1server.py
+--- mercurial/wireprotov1server.py     Thu May 07 03:14:52 2020 -0700
++++ mercurial/wireprotov1server.py     Fri Apr 24 20:00:25 2020 +0200
+@@ -391,7 +391,7 @@
+     res = exchange.filterclonebundleentries(repo, res)
+     if not res:
+         return None
+-    cl = repo.changelog
++    cl = repo.unfiltered().changelog
+     heads_anc = cl.ancestors([cl.rev(rev) for rev in heads], inclusive=True)
+     common_anc = cl.ancestors([cl.rev(rev) for rev in common], inclusive=True)
+     compformats = clientcompressionsupport(proto)
+diff -r ed684a82e29b -r 3d5fb6cab832 tests/test-pull-bundle.t
+--- tests/test-pull-bundle.t   Thu May 07 03:14:52 2020 -0700
++++ tests/test-pull-bundle.t   Fri Apr 24 20:00:25 2020 +0200
+@@ -36,6 +36,8 @@
+   $ cat <<EOF > .hg/hgrc
+   > [server]
+   > pullbundle = True
++  > [experimental]
++  > evolution = True
+   > [extensions]
+   > blackbox =
+   > EOF
+@@ -185,3 +187,24 @@
+   * sending pullbundle "0.hg" (glob)
+   * sending pullbundle "0.hg" (glob)
+   $ rm repo/.hg/blackbox.log
++
++Test processing when nodes used in the pullbundle.manifest end up being hidden
++
++  $ hg --repo repo debugobsolete ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a
++  1 new obsolescence markers
++  obsoleted 1 changesets
++  $ hg serve --repo repo --config server.view=visible -p $HGPORT -d --pid-file=hg.pid -E errors.log
++  $ cat hg.pid >> $DAEMON_PIDS
++  $ hg clone http://localhost:$HGPORT repo-obs
++  requesting all changes
++  adding changesets
++  adding manifests
++  adding file changes
++  adding changesets
++  adding manifests
++  adding file changes
++  added 2 changesets with 2 changes to 2 files
++  new changesets bbd179dfa0a7:effea6de0384
++  updating to branch default
++  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
++  $ killdaemons.py
Index: pkgsrc/devel/py-mercurial/patches/patch-D8487
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-D8487:1.1
--- /dev/null   Sun May 24 01:16:26 2020
+++ pkgsrc/devel/py-mercurial/patches/patch-D8487       Sun May 24 01:16:26 2020
@@ -0,0 +1,27 @@
+$NetBSD: patch-D8487,v 1.1 2020/05/24 01:16:26 joerg Exp $
+
+# HG changeset patch
+# User Joerg Sonnenberger <joerg%bec.de@localhost>
+# Date 1587944362 -7200
+#      Mon Apr 27 01:39:22 2020 +0200
+# Branch stable
+# Node ID 5d309906ed0e4e2b0ade4d1539cbea7dc2c44771
+# Parent  a50f33f1ff24466d6d721685cc65a732cb4c522c
+fastexport: downgrade message about already exported changesets to debug
+
+The old warning level is just too noisy for incremental processing.
+
+Differential Revision: https://phab.mercurial-scm.org/D8487
+
+diff -r a50f33f1ff24 -r 5d309906ed0e hgext/fastexport.py
+--- hgext/fastexport.py        Sun Apr 26 14:29:47 2020 -0400
++++ hgext/fastexport.py        Mon Apr 27 01:39:22 2020 +0200
+@@ -80,7 +80,7 @@
+     ctx = repo[rev]
+     revid = ctx.hex()
+     if revid in marks:
+-        ui.warn(_(b"warning: revision %s already exported, skipped\n") % revid)
++        ui.debug(b"warning: revision %s already exported, skipped\n" % revid)
+         return
+     parents = [p for p in ctx.parents() if p.rev() != nullrev]
+     for p in parents:
Index: pkgsrc/devel/py-mercurial/patches/patch-D8490
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-D8490:1.1
--- /dev/null   Sun May 24 01:16:26 2020
+++ pkgsrc/devel/py-mercurial/patches/patch-D8490       Sun May 24 01:16:26 2020
@@ -0,0 +1,54 @@
+$NetBSD: patch-D8490,v 1.1 2020/05/24 01:16:26 joerg Exp $
+
+# HG changeset patch
+# User Joerg Sonnenberger <joerg%bec.de@localhost>
+# Date 1588289528 -7200
+#      Fri May 01 01:32:08 2020 +0200
+# Branch stable
+# Node ID 886c6a1b87bc66671c4e654c2d607800a4a712e9
+# Parent  be6401a2572646712aebe80520ee8909562bb0a5
+hooks: provide access to transaction changes for internal hooks
+
+External hooks are skipped here as the environment often has a size
+limit in the low MBs and that can easily be reached by larger
+transactions.
+
+Differential Revision: https://phab.mercurial-scm.org/D8490
+
+diff -r be6401a25726 -r 886c6a1b87bc mercurial/hook.py
+--- mercurial/hook.py  Thu May 07 23:54:37 2020 +0200
++++ mercurial/hook.py  Fri May 01 01:32:08 2020 +0200
+@@ -158,6 +158,10 @@
+     env[b'HG_HOOKNAME'] = name
+ 
+     for k, v in pycompat.iteritems(args):
++        # transaction changes can accumulate MBs of data, so skip it
++        # for external hooks
++        if k == b'changes':
++            continue
+         if callable(v):
+             v = v()
+         if isinstance(v, (dict, list)):
+diff -r be6401a25726 -r 886c6a1b87bc mercurial/localrepo.py
+--- mercurial/localrepo.py     Thu May 07 23:54:37 2020 +0200
++++ mercurial/localrepo.py     Fri May 01 01:32:08 2020 +0200
+@@ -2243,6 +2243,7 @@
+ 
+         tr.hookargs[b'txnid'] = txnid
+         tr.hookargs[b'txnname'] = desc
++        tr.hookargs[b'changes'] = tr.changes
+         # note: writing the fncache only during finalize mean that the file is
+         # outdated when running hooks. As fncache is used for streaming clone,
+         # this is not expected to break anything that happen during the hooks.
+diff -r be6401a25726 -r 886c6a1b87bc tests/test-hook.t
+--- tests/test-hook.t  Thu May 07 23:54:37 2020 +0200
++++ tests/test-hook.t  Fri May 01 01:32:08 2020 +0200
+@@ -443,7 +443,7 @@
+   HG_PENDING=$TESTTMP/a
+   
+   transaction abort!
+-  txnabort Python hook: txnid,txnname
++  txnabort Python hook: changes,txnid,txnname
+   txnabort hook: HG_HOOKNAME=txnabort.1
+   HG_HOOKTYPE=txnabort
+   HG_TXNID=TXN:$ID$
Index: pkgsrc/devel/py-mercurial/patches/patch-D8505
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-D8505:1.1
--- /dev/null   Sun May 24 01:16:26 2020
+++ pkgsrc/devel/py-mercurial/patches/patch-D8505       Sun May 24 01:16:26 2020
@@ -0,0 +1,53 @@
+$NetBSD: patch-D8505,v 1.1 2020/05/24 01:16:26 joerg Exp $
+
+# HG changeset patch
+# User Joerg Sonnenberger <joerg%bec.de@localhost>
+# Date 1588887605 -7200
+#      Thu May 07 23:40:05 2020 +0200
+# Branch stable
+# Node ID 9d7d53771e5fa5c17bea578a89258350df6294ac
+# Parent  35bb67427f63abeb02be76238ab79afbe1ded034
+tests: fix timer scaling in wait-on-file
+
+When using the default test timeouts, wait-on-file would not wait for $n
+seconds, but $n/100 seconds. This resulted in easy timeouts on even
+moderately busy fast machines. Fix the scaling to apply in all cases.
+Adjust the stepping slightly to be nicer to systems with the historic
+100Hz time base to ensure that the scheduler actually switches to a
+different process and gives them time to work.
+
+Differential Revision: https://phab.mercurial-scm.org/D8505
+
+diff -r 35bb67427f63 -r 9d7d53771e5f tests/testlib/wait-on-file
+--- tests/testlib/wait-on-file Sat May 09 20:25:07 2020 +0200
++++ tests/testlib/wait-on-file Thu May 07 23:40:05 2020 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # wait up to TIMEOUT seconds until a WAIT_ON_FILE is created.
+ #
+@@ -11,9 +11,12 @@
+ 
+ timer="$1"
+ 
+-# if the test timeout have been extended, explicitly extend the provided timer
++# Scale the timeout to match the sleep steps below, i.e. 1/0.02.
++timer=$(( 50 * $timer ))
++# If the test timeout have been extended, also scale the timer relative
++# to the normal timing.
+ if [ "$HGTEST_TIMEOUT_DEFAULT" -lt "$HGTEST_TIMEOUT" ]; then
+-    timer=$(( ( 100 * $timer * $HGTEST_TIMEOUT) / $HGTEST_TIMEOUT_DEFAULT ))
++    timer=$(( ( $timer * $HGTEST_TIMEOUT) / $HGTEST_TIMEOUT_DEFAULT ))
+ fi
+ 
+ wait_on="$2"
+@@ -30,7 +33,7 @@
+ while [ "$timer" -gt 0 ] && [ ! -f "$wait_on" ];
+ do
+     timer=$(( $timer - 1))
+-    sleep 0.01
++    sleep 0.02
+ done
+ if [ "$timer" -le 0 ]; then
+     echo "file not created after $1 seconds: $wait_on" >&2
Index: pkgsrc/devel/py-mercurial/patches/patch-D8522
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-D8522:1.1
--- /dev/null   Sun May 24 01:16:26 2020
+++ pkgsrc/devel/py-mercurial/patches/patch-D8522       Sun May 24 01:16:26 2020
@@ -0,0 +1,229 @@
+$NetBSD: patch-D8522,v 1.1 2020/05/24 01:16:26 joerg Exp $
+
+# HG changeset patch
+# User Joerg Sonnenberger <joerg%bec.de@localhost>
+# Date 1589314856 -7200
+#      Tue May 12 22:20:56 2020 +0200
+# Branch stable
+# Node ID edffab2cf0ead5140fdaa391c1c827ddc53dfe35
+# Parent  f71c8eea7161c6292389339557d9e538e0fcdc51
+fastexport: adjust output to be more canonical
+
+For time zones, git doesn't consider +0 and -0 the same timezone, so use
+the former canonically. Add a test case to ensure that non-UTC offsets
+are handled correctly. The real name part of the committer name is
+normally not quoted, so don't enforce that.
+
+Differential Revision: https://phab.mercurial-scm.org/D8522
+
+diff -r f71c8eea7161 -r edffab2cf0ea hgext/fastexport.py
+--- hgext/fastexport.py        Mon May 11 08:13:40 2020 +0200
++++ hgext/fastexport.py        Tue May 12 22:20:56 2020 +0200
+@@ -53,7 +53,7 @@
+ 
+ def convert_to_git_date(date):
+     timestamp, utcoff = date
+-    tzsign = b"+" if utcoff < 0 else b"-"
++    tzsign = b"+" if utcoff <= 0 else b"-"
+     if utcoff % 60 != 0:
+         raise error.Abort(
+             _(b"UTC offset in %b is not an integer number of seconds") % (date,)
+diff -r f71c8eea7161 -r edffab2cf0ea tests/test-fastexport.t
+--- tests/test-fastexport.t    Mon May 11 08:13:40 2020 +0200
++++ tests/test-fastexport.t    Tue May 12 22:20:56 2020 +0200
+@@ -10,7 +10,7 @@
+   $ hg up -r 10
+   13 files updated, 0 files merged, 0 files removed, 0 files unresolved
+   $ hg rm nf10
+-  $ hg commit -u debugbuilddag --date 'Thu Jan 01 00:00:12 1970 +0000' -m r12
++  $ hg commit -u debugbuilddag --date 'Thu Jan 01 02:30:12 1970 +0230' -m r12
+   created new head
+   $ hg up -r 11
+   4 files updated, 0 files merged, 0 files removed, 0 files unresolved
+@@ -20,20 +20,20 @@
+   $ hg commit -m debugbuilddag --date 'Thu Jan 01 00:00:13 1970 +0000'
+ 
+   $ hg log -G
+-  @    changeset:   13:e5c379648af4
++  @    changeset:   13:5544befcb7ce
+   |\   branch:      both
+   | |  tag:         tip
+   | |  parent:      11:2cbd52c10e88
+-  | |  parent:      12:4f31c9604af6
++  | |  parent:      12:66d0c21243be
+   | |  user:        test
+   | |  date:        Thu Jan 01 00:00:13 1970 +0000
+   | |  summary:     debugbuilddag
+   | |
+-  | o  changeset:   12:4f31c9604af6
++  | o  changeset:   12:66d0c21243be
+   | |  branch:      both
+   | |  parent:      10:9220596cb068
+   | |  user:        debugbuilddag
+-  | |  date:        Thu Jan 01 00:00:12 1970 +0000
++  | |  date:        Thu Jan 01 02:30:12 1970 +0230
+   | |  summary:     r12
+   | |
+   o |  changeset:   11:2cbd52c10e88
+@@ -150,7 +150,7 @@
+   
+   commit refs/heads/default
+   mark :3
+-  committer "debugbuilddag" <debugbuilddag> 0 -0000
++  committer "debugbuilddag" <debugbuilddag> 0 +0000
+   data 2
+   r0
+   M 644 :1 mf
+@@ -197,7 +197,7 @@
+   
+   commit refs/heads/default
+   mark :7
+-  committer "debugbuilddag" <debugbuilddag> 1 -0000
++  committer "debugbuilddag" <debugbuilddag> 1 +0000
+   data 2
+   r1
+   from :3
+@@ -245,7 +245,7 @@
+   
+   commit refs/heads/name1
+   mark :11
+-  committer "debugbuilddag" <debugbuilddag> 2 -0000
++  committer "debugbuilddag" <debugbuilddag> 2 +0000
+   data 2
+   r2
+   from :7
+@@ -293,7 +293,7 @@
+   
+   commit refs/heads/name1
+   mark :15
+-  committer "debugbuilddag" <debugbuilddag> 3 -0000
++  committer "debugbuilddag" <debugbuilddag> 3 +0000
+   data 2
+   r3
+   from :11
+@@ -341,7 +341,7 @@
+   
+   commit refs/heads/name1
+   mark :19
+-  committer "debugbuilddag" <debugbuilddag> 4 -0000
++  committer "debugbuilddag" <debugbuilddag> 4 +0000
+   data 2
+   r4
+   from :15
+@@ -389,7 +389,7 @@
+   
+   commit refs/heads/name2
+   mark :23
+-  committer "debugbuilddag" <debugbuilddag> 5 -0000
++  committer "debugbuilddag" <debugbuilddag> 5 +0000
+   data 2
+   r5
+   from :7
+@@ -437,7 +437,7 @@
+   
+   commit refs/heads/name2
+   mark :27
+-  committer "debugbuilddag" <debugbuilddag> 6 -0000
++  committer "debugbuilddag" <debugbuilddag> 6 +0000
+   data 2
+   r6
+   from :23
+@@ -485,7 +485,7 @@
+   
+   commit refs/heads/name2
+   mark :31
+-  committer "debugbuilddag" <debugbuilddag> 7 -0000
++  committer "debugbuilddag" <debugbuilddag> 7 +0000
+   data 2
+   r7
+   from :27
+@@ -533,7 +533,7 @@
+   
+   commit refs/heads/name2
+   mark :35
+-  committer "debugbuilddag" <debugbuilddag> 8 -0000
++  committer "debugbuilddag" <debugbuilddag> 8 +0000
+   data 2
+   r8
+   from :31
+@@ -581,7 +581,7 @@
+   
+   commit refs/heads/both
+   mark :39
+-  committer "debugbuilddag" <debugbuilddag> 9 -0000
++  committer "debugbuilddag" <debugbuilddag> 9 +0000
+   data 2
+   r9
+   from :35
+@@ -633,7 +633,7 @@
+   
+   commit refs/heads/both
+   mark :43
+-  committer "debugbuilddag" <debugbuilddag> 10 -0000
++  committer "debugbuilddag" <debugbuilddag> 10 +0000
+   data 3
+   r10
+   from :39
+@@ -681,7 +681,7 @@
+   
+   commit refs/heads/both
+   mark :47
+-  committer "debugbuilddag" <debugbuilddag> 11 -0000
++  committer "debugbuilddag" <debugbuilddag> 11 +0000
+   data 3
+   r11
+   from :43
+@@ -691,7 +691,7 @@
+   
+   commit refs/heads/both
+   mark :48
+-  committer "debugbuilddag" <debugbuilddag> 12 -0000
++  committer "debugbuilddag" <debugbuilddag> 12 +0230
+   data 3
+   r12
+   from :43
+@@ -699,7 +699,7 @@
+   
+   commit refs/heads/both
+   mark :49
+-  committer "test" <test> 13 -0000
++  committer "test" <test> 13 +0000
+   data 13
+   debugbuilddag
+   from :47
+@@ -754,8 +754,8 @@
+   33fbc651630ffa7ccbebfe4eb91320a873e7291c
+   868d828870663d075cdcff502d26cf8445ce068e
+   2cbd52c10e88ce604402dc83a869ec4f07765b3d
+-  4f31c9604af676986343d775b05695f535e8db5e
+-  e5c379648af4c9fa3b5546ab7ee6e61a36082830
++  66d0c21243be072f82ced64aa730ab0367252451
++  5544befcb7ce4a558ed9e19909e16af574a2a3c6
+ 
+   $ hg fastexport --export-marks fastexport.marks2 -r 0
+   blob
+@@ -793,7 +793,7 @@
+   
+   commit refs/heads/default
+   mark :3
+-  committer "debugbuilddag" <debugbuilddag> 0 -0000
++  committer "debugbuilddag" <debugbuilddag> 0 +0000
+   data 2
+   r0
+   M 644 :1 mf
+@@ -845,7 +845,7 @@
+   
+   commit refs/heads/default
+   mark :7
+-  committer "debugbuilddag" <debugbuilddag> 1 -0000
++  committer "debugbuilddag" <debugbuilddag> 1 +0000
+   data 2
+   r1
+   from :3
+@@ -861,5 +861,5 @@
+   data 4
+   foo
+   
+-  abort: Unable to parse user into person and email for revision 4f71ca786403919cd16669d94ff7cd1c09437a44
++  abort: Unable to parse user into person and email for revision 65a3f69b9b519de73d755472c1ab05990ab8a7f7
+   [255]
Index: pkgsrc/devel/py-mercurial/patches/patch-D8574
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-D8574:1.1
--- /dev/null   Sun May 24 01:16:26 2020
+++ pkgsrc/devel/py-mercurial/patches/patch-D8574       Sun May 24 01:16:26 2020
@@ -0,0 +1,129 @@
+$NetBSD: patch-D8574,v 1.1 2020/05/24 01:16:26 joerg Exp $
+
+# HG changeset patch
+# User Joerg Sonnenberger <joerg%bec.de@localhost>
+# Date 1589846232 -7200
+#      Tue May 19 01:57:12 2020 +0200
+# Branch stable
+# Node ID 423cb450e7220473e144dc6fb089bec01c8d9d44
+# Parent  d658f1dff315336db8525f987af799179a060cbe
+hooks: teach reject_new_heads about phase transitions
+
+Differential Revision: https://phab.mercurial-scm.org/D8574
+
+diff -r d658f1dff315 -r 423cb450e722 hgext/hooklib/reject_new_heads.py
+--- hgext/hooklib/reject_new_heads.py  Sun May 17 18:33:45 2020 -0400
++++ hgext/hooklib/reject_new_heads.py  Tue May 19 01:57:12 2020 +0200
+@@ -4,8 +4,8 @@
+ # GNU General Public License version 2 or any later version.
+ 
+ """reject_new_heads is a hook to check that branches touched by new changesets
+-have at most one open head. It can be used to enforce policies for
+-merge-before-push or rebase-before-push. It does not handle pre-existing
++or phase transitions have at most one open head. It can be used to enforce policies
++for merge-before-push or rebase-before-push. It does not handle pre-existing
+ hydras.
+ 
+ Usage:
+@@ -30,9 +30,14 @@
+         )
+     ctx = repo.unfiltered()[node]
+     branches = set()
+-    for rev in repo.changelog.revs(start=ctx.rev()):
+-        rev = repo[rev]
+-        branches.add(rev.branch())
++    if ctx.rev():
++        for rev in repo.changelog.revs(start=ctx.rev()):
++            rev = repo[rev]
++            branches.add(rev.branch())
++    for revs, (old, new) in kwargs.get('changes', {b'phases': []})[b'phases']:
++        for rev in revs:
++            branches.add(repo.unfiltered()[rev].branch())
++
+     for branch in branches:
+         if len(repo.revs("head() and not closed() and branch(%s)", branch)) > 1:
+             raise error.Abort(
+diff -r d658f1dff315 -r 423cb450e722 tests/test-hooklib-reject_new_heads.t
+--- tests/test-hooklib-reject_new_heads.t      Sun May 17 18:33:45 2020 -0400
++++ tests/test-hooklib-reject_new_heads.t      Tue May 19 01:57:12 2020 +0200
+@@ -5,6 +5,7 @@
+   > [phases]
+   > publish = False
+   > EOF
++
+   $ hg init a
+   $ hg --cwd a debugbuilddag '.:parent.*parent'
+   $ hg --cwd a log -G
+@@ -26,6 +27,7 @@
+      date:        Thu Jan 01 00:00:00 1970 +0000
+      summary:     r0
+   
++
+   $ hg init b
+   $ cat <<EOF >> b/.hg/hgrc
+   > [hooks]
+@@ -43,11 +45,61 @@
+   rollback completed
+   abort: Changes on branch 'default' resulted in multiple heads
+   [255]
+-  $ hg --cwd b pull ../a -r 1ea73414a91b
++  $ hg --cwd b pull ../a -r 66f7d451a68b
+   pulling from ../a
+   adding changesets
+   adding manifests
+   adding file changes
+-  added 1 changesets with 0 changes to 0 files
+-  new changesets 1ea73414a91b (1 drafts)
++  added 2 changesets with 0 changes to 0 files
++  new changesets 1ea73414a91b:66f7d451a68b (2 drafts)
+   (run 'hg update' to get a working copy)
++
++  $ hg --cwd b phase --public 66f7d451a68b
++  $ hg --cwd b --config hooks.pretxnclose.reject_new_heads= pull ../a
++  pulling from ../a
++  searching for changes
++  adding changesets
++  adding manifests
++  adding file changes
++  added 1 changesets with 0 changes to 0 files (+1 heads)
++  new changesets fa942426a6fd (1 drafts)
++  (run 'hg heads' to see heads, 'hg merge' to merge)
++
++Test that pushing a draft change to a publishing server having the same
++change already still triggers the check on the phase transition. The
++changeset should remain as draft.
++
++  $ cat <<EOF >> b/.hg/hgrc
++  > [serve]
++  > view = immutable
++  > 
++  > [phases]
++  > publish = True
++  > EOF
++
++  $ cat > web.conf << EOF
++  > [paths]
++  > / = *
++  > 
++  > [web]
++  > push_ssl = false
++  > allow_push = *
++  > EOF
++
++  $ hg --cwd b serve --web-conf ../web.conf -p $HGPORT -d --pid-file ../hg.pid
++  $ cat hg.pid >> $DAEMON_PIDS
++
++  $ hg --cwd a push -f http://localhost:$HGPORT
++  pushing to http://localhost:$HGPORT/
++  searching for changes
++  no changes found
++  remote: error: pretxnclose.reject_new_heads hook failed: Changes on branch 'default' resulted in multiple heads
++  remote: Changes on branch 'default' resulted in multiple heads
++  abort: push failed on remote
++  [255]
++  $ hg phase --cwd b fa942426a6fd
++  2: draft
++
++Cleanup.
++
++  $ killdaemons.py
Index: pkgsrc/devel/py-mercurial/patches/patch-D8575
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-D8575:1.1
--- /dev/null   Sun May 24 01:16:26 2020
+++ pkgsrc/devel/py-mercurial/patches/patch-D8575       Sun May 24 01:16:26 2020
@@ -0,0 +1,132 @@
+$NetBSD: patch-D8575,v 1.1 2020/05/24 01:16:26 joerg Exp $
+
+# HG changeset patch
+# User Joerg Sonnenberger <joerg%bec.de@localhost>
+# Date 1590077930 -7200
+#      Thu May 21 18:18:50 2020 +0200
+# Branch stable
+# Node ID c6bc304695881f82d7f0803d136678d7d29b193b
+# Parent  423cb450e7220473e144dc6fb089bec01c8d9d44
+hooklib: fix detection of successors for changeset_obsoleted
+
+Provide a hook for obsutil.getobsolete to be used with either a
+transaction or the changes item of the transaction, since hooks only
+have access to the latter. Use that to find the correct list of
+revisions with obsmarkers, even new ones, and then filter out revisions
+with known successors.
+
+Move the processing from pretxnclose to txnclose as the transaction
+access itself is no longer necessary. This is more in line with notify
+and ensures that sanity checks can abort the transaction first.
+
+Differential Revision: https://phab.mercurial-scm.org/D8575
+
+diff -r 423cb450e722 -r c6bc30469588 hgext/hooklib/changeset_obsoleted.py
+--- hgext/hooklib/changeset_obsoleted.py       Tue May 19 01:57:12 2020 +0200
++++ hgext/hooklib/changeset_obsoleted.py       Thu May 21 18:18:50 2020 +0200
+@@ -122,10 +122,18 @@
+         )
+ 
+ 
++def has_successor(repo, rev):
++    return any(
++        r for r in obsutil.allsuccessors(repo.obsstore, [rev]) if r != rev
++    )
++
++
+ def hook(ui, repo, hooktype, node=None, **kwargs):
+-    if hooktype != b"pretxnclose":
++    if hooktype != b"txnclose":
+         raise error.Abort(
+             _(b'Unsupported hook type %r') % pycompat.bytestr(hooktype)
+         )
+-    for rev in obsutil.getobsoleted(repo, repo.currenttransaction()):
+-        _report_commit(ui, repo, repo.unfiltered()[rev])
++    for rev in obsutil.getobsoleted(repo, changes=kwargs['changes']):
++        ctx = repo.unfiltered()[rev]
++        if not has_successor(repo, ctx.node()):
++            _report_commit(ui, repo, ctx)
+diff -r 423cb450e722 -r c6bc30469588 mercurial/obsutil.py
+--- mercurial/obsutil.py       Tue May 19 01:57:12 2020 +0200
++++ mercurial/obsutil.py       Thu May 21 18:18:50 2020 +0200
+@@ -481,14 +481,21 @@
+     return effects
+ 
+ 
+-def getobsoleted(repo, tr):
+-    """return the set of pre-existing revisions obsoleted by a transaction"""
++def getobsoleted(repo, tr=None, changes=None):
++    """return the set of pre-existing revisions obsoleted by a transaction
++
++    Either the transaction or changes item of the transaction (for hooks)
++    must be provided, but not both.
++    """
++    assert (tr is None) != (changes is None)
+     torev = repo.unfiltered().changelog.index.get_rev
+     phase = repo._phasecache.phase
+     succsmarkers = repo.obsstore.successors.get
+     public = phases.public
+-    addedmarkers = tr.changes[b'obsmarkers']
+-    origrepolen = tr.changes[b'origrepolen']
++    if changes is None:
++        changes = tr.changes
++    addedmarkers = changes[b'obsmarkers']
++    origrepolen = changes[b'origrepolen']
+     seenrevs = set()
+     obsoleted = set()
+     for mark in addedmarkers:
+diff -r 423cb450e722 -r c6bc30469588 tests/test-hooklib-changeset_obsoleted.t
+--- tests/test-hooklib-changeset_obsoleted.t   Tue May 19 01:57:12 2020 +0200
++++ tests/test-hooklib-changeset_obsoleted.t   Thu May 21 18:18:50 2020 +0200
+@@ -24,7 +24,7 @@
+   $ cat <<EOF >> b/.hg/hgrc
+   > [hooks]
+   > incoming.notify = python:hgext.notify.hook
+-  > pretxnclose.changeset_obsoleted = python:hgext.hooklib.changeset_obsoleted.hook
++  > txnclose.changeset_obsoleted = python:hgext.hooklib.changeset_obsoleted.hook
+   > EOF
+   $ hg --cwd b pull ../a | "$PYTHON" $TESTDIR/unwrap-message-id.py
+   pulling from ../a
+@@ -72,6 +72,8 @@
+   pushing to ../b
+   searching for changes
+   no changes found
++  1 new obsolescence markers
++  obsoleted 1 changesets
+   Subject: changeset abandoned
+   In-reply-to: <hg.81c297828fd2d5afaadf2775a6a71b74143b6451dfaac09fac939e9107a50d01%example.com@localhost>
+   Message-Id: <hg.d6329e9481594f0f3c8a84362b3511318bfbce50748ab1123f909eb6fbcab018%example.com@localhost>
+@@ -80,5 +82,33 @@
+   To: baz%example.com@localhost
+   
+   This changeset has been abandoned.
++
++Check that known changesets with known successors do not result in a mail.
++
++  $ hg init c
++  $ hg init d
++  $ cat <<EOF >> d/.hg/hgrc
++  > [hooks]
++  > incoming.notify = python:hgext.notify.hook
++  > txnclose.changeset_obsoleted = python:hgext.hooklib.changeset_obsoleted.hook
++  > EOF
++  $ hg --cwd c debugbuilddag '.:parent.*parent'
++  $ hg --cwd c push ../d -r 1
++  pushing to ../d
++  searching for changes
++  adding changesets
++  adding manifests
++  adding file changes
++  added 2 changesets with 0 changes to 0 files
++  $ hg --cwd c debugobsolete $(hg --cwd c log -T '{node}' -r 1) $(hg --cwd c log -T '{node}' -r 2)
+   1 new obsolescence markers
+   obsoleted 1 changesets
++  $ hg --cwd c push ../d | "$PYTHON" $TESTDIR/unwrap-message-id.py
++  pushing to ../d
++  searching for changes
++  adding changesets
++  adding manifests
++  adding file changes
++  added 1 changesets with 0 changes to 0 files (+1 heads)
++  1 new obsolescence markers
++  obsoleted 1 changesets



Home | Main Index | Thread Index | Old Index