Wed Mar 2 19:31:13 2016 UTC ()
Update py-mercurial to 3.7.2.

Include
changeset:   34663:332926212ef8
user:        FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date:        Wed Feb 24 06:10:46 2016 +0900
files:       mercurial/repoview.py tests/test-commandserver.t
description:
repoview: discard filtered changelog if index isn't shared with unfiltered

on top of 3.7.2 to fix a test failure, see
https://bz.mercurial-scm.org/show_bug.cgi?id=4642

This is a regularly-scheduled bugfix release.

    bundlerepo: properly handle hidden linkrev in filelog (issue4945)
    bundlerepo: properly handle hidden linkrev in manifestlog (issue4945)
    demandimport: add _imp to ignore list
    doc: correct example concerning "hg purge" alias in man page "hgrc.5"
    doc: remove deprecated option from synopsis of command help
    fileset: fix copy/paste in eol() error message
    help: fix typo in backgroundclose documentation
    help: hg.intevation.de is new primary name of hg.intevation.de (and new cert)
    help: update template examples to use reST literal syntax
    hg: obtain lock when creating share from pooled repo (issue5104)
    log: fix order of revisions filtered by multiple OR options (issue5100)
    rebase: update working directory when aborting (issue5084)
    revert: properly revert to ancestor of p2 during merge (issue5052)
    revset: flatten chained 'list' operations (aka function args) (issue5072)
    setup: avoid procedure related to hg.exe at setup.py --pure
    ui: fix crash by non-interactive prompt echo for user name
    unionrepo: properly handle hidden linkrev in revlog (issue5070)
    zeroconf: forward all arguments passed to ui.configitems() wrapper


(wiz)
diff -r1.30 -r1.31 pkgsrc/devel/py-mercurial/Makefile.version
diff -r1.31 -r1.32 pkgsrc/devel/py-mercurial/distinfo
diff -r0 -r1.1 pkgsrc/devel/py-mercurial/patches/patch-mercurial_repoview.py
diff -r0 -r1.1 pkgsrc/devel/py-mercurial/patches/patch-tests_test-commandserver.t

cvs diff -r1.30 -r1.31 pkgsrc/devel/py-mercurial/Attic/Makefile.version (expand / switch to unified diff)

--- pkgsrc/devel/py-mercurial/Attic/Makefile.version 2016/02/06 11:04:27 1.30
+++ pkgsrc/devel/py-mercurial/Attic/Makefile.version 2016/03/02 19:31:13 1.31
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1# $NetBSD: Makefile.version,v 1.30 2016/02/06 11:04:27 wiz Exp $ 1# $NetBSD: Makefile.version,v 1.31 2016/03/02 19:31:13 wiz Exp $
2 2
3VERSION= 3.7.1 3VERSION= 3.7.2
4 4
5PYTHON_VERSIONS_INCOMPATIBLE= 33 34 35 # not yet ported as of 3.4.1 5PYTHON_VERSIONS_INCOMPATIBLE= 33 34 35 # not yet ported as of 3.4.1
6# see also http://mercurial.selenic.com/wiki/SupportedPythonVersions 6# see also http://mercurial.selenic.com/wiki/SupportedPythonVersions
7# 3.x support is not planned for the near future 7# 3.x support is not planned for the near future
8# 8#
9# the following setup argument was requested when compiling 9# the following setup argument was requested when compiling
10# for python-3.x 10# for python-3.x
11#.include "../../lang/python/pyversion.mk" 11#.include "../../lang/python/pyversion.mk"
12# 12#
13#.if "${PYPKGPREFIX}" != "py27" 13#.if "${PYPKGPREFIX}" != "py27"
14#PYSETUPARGS+= --c2to3 14#PYSETUPARGS+= --c2to3
15#.endif 15#.endif

cvs diff -r1.31 -r1.32 pkgsrc/devel/py-mercurial/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/py-mercurial/distinfo 2016/02/06 11:04:27 1.31
+++ pkgsrc/devel/py-mercurial/distinfo 2016/03/02 19:31:13 1.32
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
1$NetBSD: distinfo,v 1.31 2016/02/06 11:04:27 wiz Exp $ 1$NetBSD: distinfo,v 1.32 2016/03/02 19:31:13 wiz Exp $
2 2
3SHA1 (mercurial-3.7.1.tar.gz) = 8ce55b297c6a62e987657498746eeca870301ffb 3SHA1 (mercurial-3.7.2.tar.gz) = d684386cfe7a1f4170243ce51c78e64ee1cd8d75
4RMD160 (mercurial-3.7.1.tar.gz) = d976df0615b47096e732f18c20f881b61593c454 4RMD160 (mercurial-3.7.2.tar.gz) = ac59bdef478819f25124035ae55d28fd121128ab
5SHA512 (mercurial-3.7.1.tar.gz) = 32df161756d7c76abd792bfe5dc3d3f2ea39facdc9c9bd8d93193ecd6cc171f050a4e6dae18255614087ba6fa8f9d787aac41b137c233fa9c3f32217a9cad112 5SHA512 (mercurial-3.7.2.tar.gz) = 573b35052ec50f4672cdd5afd93080edc864deb854b890c8cedba53c40d6d3a37a560e364b94b819cfc6d9fc5c07c0411a13167f0888007e5c9366bc94154306
6Size (mercurial-3.7.1.tar.gz) = 4630846 bytes 6Size (mercurial-3.7.2.tar.gz) = 4634748 bytes
 7SHA1 (patch-mercurial_repoview.py) = 7d154dd2186edf5311dfc8902638857a72ba6129
 8SHA1 (patch-tests_test-commandserver.t) = 12c3092e3e832b414dd4155ffb678b7f0612495d

File Added: pkgsrc/devel/py-mercurial/patches/Attic/patch-mercurial_repoview.py
$NetBSD: patch-mercurial_repoview.py,v 1.1 2016/03/02 19:31:13 wiz Exp $

changeset:   34663:332926212ef8
user:        FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date:        Wed Feb 24 06:10:46 2016 +0900
files:       mercurial/repoview.py tests/test-commandserver.t
description:
repoview: discard filtered changelog if index isn't shared with unfiltered

--- mercurial/repoview.py.orig	2016-03-02 00:03:43.000000000 +0000
+++ mercurial/repoview.py
@@ -315,7 +315,10 @@ class repoview(object):
         revs = filterrevs(unfi, self.filtername)
         cl = self._clcache
         newkey = (unfilen, unfinode, hash(revs), unfichangelog._delayed)
-        if cl is not None and newkey != self._clcachekey:
+        # if cl.index is not unfiindex, unfi.changelog would be
+        # recreated, and our clcache refers to garbage object
+        if (cl is not None and
+            (cl.index is not unfiindex or newkey != self._clcachekey)):
             cl = None
         # could have been made None by the previous if
         if cl is None:

File Added: pkgsrc/devel/py-mercurial/patches/Attic/patch-tests_test-commandserver.t
$NetBSD: patch-tests_test-commandserver.t,v 1.1 2016/03/02 19:31:13 wiz Exp $

changeset:   34663:332926212ef8
user:        FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date:        Wed Feb 24 06:10:46 2016 +0900
files:       mercurial/repoview.py tests/test-commandserver.t
description:
repoview: discard filtered changelog if index isn't shared with unfiltered

--- tests/test-commandserver.t.orig	2016-03-02 00:03:43.000000000 +0000
+++ tests/test-commandserver.t
@@ -725,3 +725,133 @@ unix domain socket:
   [255]
 
 #endif
+
+  $ cd ..
+
+Test that accessing to invalid changelog cache is avoided at
+subsequent operations even if repo object is reused even after failure
+of transaction (see 0a7610758c42 also)
+
+"hg log" after failure of transaction is needed to detect invalid
+cache in repoview: this can't detect by "hg verify" only.
+
+Combination of "finalization" and "empty-ness of changelog" (2 x 2 =
+4) are tested, because '00changelog.i' are differently changed in each
+cases.
+
+  $ cat > $TESTTMP/failafterfinalize.py <<EOF
+  > # extension to abort transaction after finalization forcibly
+  > from mercurial import commands, error, extensions, lock as lockmod
+  > def fail(tr):
+  >     raise error.Abort('fail after finalization')
+  > def reposetup(ui, repo):
+  >     class failrepo(repo.__class__):
+  >         def commitctx(self, ctx, error=False):
+  >             if self.ui.configbool('failafterfinalize', 'fail'):
+  >                 # 'sorted()' by ASCII code on category names causes
+  >                 # invoking 'fail' after finalization of changelog
+  >                 # using "'cl-%i' % id(self)" as category name
+  >                 self.currenttransaction().addfinalize('zzzzzzzz', fail)
+  >             return super(failrepo, self).commitctx(ctx, error)
+  >     repo.__class__ = failrepo
+  > EOF
+
+  $ hg init repo3
+  $ cd repo3
+
+  $ cat <<EOF >> $HGRCPATH
+  > [ui]
+  > logtemplate = {rev} {desc|firstline} ({files})\n
+  > 
+  > [extensions]
+  > failafterfinalize = $TESTTMP/failafterfinalize.py
+  > EOF
+
+- test failure with "empty changelog"
+
+  $ echo foo > foo
+  $ hg add foo
+
+(failuer before finalization)
+
+  >>> from hgclient import readchannel, runcommand, check
+  >>> @check
+  ... def abort(server):
+  ...     readchannel(server)
+  ...     runcommand(server, ['commit',
+  ...                         '--config', 'hooks.pretxncommit=false',
+  ...                         '-mfoo'])
+  ...     runcommand(server, ['log'])
+  ...     runcommand(server, ['verify', '-q'])
+  *** runcommand commit --config hooks.pretxncommit=false -mfoo
+  transaction abort!
+  rollback completed
+  abort: pretxncommit hook exited with status 1
+   [255]
+  *** runcommand log
+  *** runcommand verify -q
+
+(failuer after finalization)
+
+  >>> from hgclient import readchannel, runcommand, check
+  >>> @check
+  ... def abort(server):
+  ...     readchannel(server)
+  ...     runcommand(server, ['commit',
+  ...                         '--config', 'failafterfinalize.fail=true',
+  ...                         '-mfoo'])
+  ...     runcommand(server, ['log'])
+  ...     runcommand(server, ['verify', '-q'])
+  *** runcommand commit --config failafterfinalize.fail=true -mfoo
+  transaction abort!
+  rollback completed
+  abort: fail after finalization
+   [255]
+  *** runcommand log
+  *** runcommand verify -q
+
+- test failure with "not-empty changelog"
+
+  $ echo bar > bar
+  $ hg add bar
+  $ hg commit -mbar bar
+
+(failure before finalization)
+
+  >>> from hgclient import readchannel, runcommand, check
+  >>> @check
+  ... def abort(server):
+  ...     readchannel(server)
+  ...     runcommand(server, ['commit',
+  ...                         '--config', 'hooks.pretxncommit=false',
+  ...                         '-mfoo', 'foo'])
+  ...     runcommand(server, ['log'])
+  ...     runcommand(server, ['verify', '-q'])
+  *** runcommand commit --config hooks.pretxncommit=false -mfoo foo
+  transaction abort!
+  rollback completed
+  abort: pretxncommit hook exited with status 1
+   [255]
+  *** runcommand log
+  0 bar (bar)
+  *** runcommand verify -q
+
+(failure after finalization)
+
+  >>> from hgclient import readchannel, runcommand, check
+  >>> @check
+  ... def abort(server):
+  ...     readchannel(server)
+  ...     runcommand(server, ['commit',
+  ...                         '--config', 'failafterfinalize.fail=true',
+  ...                         '-mfoo', 'foo'])
+  ...     runcommand(server, ['log'])
+  ...     runcommand(server, ['verify', '-q'])
+  *** runcommand commit --config failafterfinalize.fail=true -mfoo foo
+  transaction abort!
+  rollback completed
+  abort: fail after finalization
+   [255]
+  *** runcommand log
+  0 bar (bar)
+  *** runcommand verify -q