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: Tue Jul 25 16:09:40 UTC 2017
Modified Files:
pkgsrc/devel/py-mercurial: Makefile distinfo
Added Files:
pkgsrc/devel/py-mercurial/patches: patch-mercurial_localrepo.py
patch-mercurial_statichttprepo.py
Log Message:
Fix a memory leak, from upstream. Bump revision.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/devel/py-mercurial/Makefile
cvs rdiff -u -r1.50 -r1.51 pkgsrc/devel/py-mercurial/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/py-mercurial/patches/patch-mercurial_localrepo.py \
pkgsrc/devel/py-mercurial/patches/patch-mercurial_statichttprepo.py
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.12 pkgsrc/devel/py-mercurial/Makefile:1.13
--- pkgsrc/devel/py-mercurial/Makefile:1.12 Wed May 17 10:30:18 2017
+++ pkgsrc/devel/py-mercurial/Makefile Tue Jul 25 16:09:40 2017
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2017/05/17 10:30:18 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2017/07/25 16:09:40 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.50 pkgsrc/devel/py-mercurial/distinfo:1.51
--- pkgsrc/devel/py-mercurial/distinfo:1.50 Mon Jun 19 20:07:43 2017
+++ pkgsrc/devel/py-mercurial/distinfo Tue Jul 25 16:09:40 2017
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.50 2017/06/19 20:07:43 wiz Exp $
+$NetBSD: distinfo,v 1.51 2017/07/25 16:09:40 joerg Exp $
SHA1 (mercurial-4.2.1.tar.gz) = 3fb8e228c8e3129cae1b222085984f4f90c7140b
RMD160 (mercurial-4.2.1.tar.gz) = a0dead4f0307fd168aa3a33aa9fd5971340eedc3
SHA512 (mercurial-4.2.1.tar.gz) = 0349fb5343210869bacb2247d30546676e5cf486f64fb8ebb2b1c6cdf7d564e7b754a43fb5b61c7d7e66a67609c514c8e15f415f4189bccbebb2fbb5a5474645
Size (mercurial-4.2.1.tar.gz) = 5317692 bytes
+SHA1 (patch-mercurial_localrepo.py) = 2db659d4d5ee12c26a5dc78c87d5c30857cc3fb8
+SHA1 (patch-mercurial_statichttprepo.py) = a16b8eeae241cf0ecff310b6af70559b7a45daa2
Added files:
Index: pkgsrc/devel/py-mercurial/patches/patch-mercurial_localrepo.py
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-mercurial_localrepo.py:1.1
--- /dev/null Tue Jul 25 16:09:40 2017
+++ pkgsrc/devel/py-mercurial/patches/patch-mercurial_localrepo.py Tue Jul 25 16:09:40 2017
@@ -0,0 +1,43 @@
+$NetBSD: patch-mercurial_localrepo.py,v 1.1 2017/07/25 16:09:40 joerg Exp $
+
+https://www.mercurial-scm.org/repo/hg/rev/7e89b
+
+--- mercurial/localrepo.py.orig 2017-06-04 13:16:29.000000000 +0000
++++ mercurial/localrepo.py
+@@ -382,6 +382,9 @@ class localrepository(object):
+ # - bookmark changes
+ self.filteredrevcache = {}
+
++ # Cache of types representing filtered repos.
++ self._filteredrepotypes = weakref.WeakKeyDictionary()
++
+ # generic mapping between names and nodes
+ self.names = namespaces.namespaces()
+
+@@ -489,11 +492,21 @@ class localrepository(object):
+
+ def filtered(self, name):
+ """Return a filtered version of a repository"""
+- # build a new class with the mixin and the current class
+- # (possibly subclass of the repo)
+- class filteredrepo(repoview.repoview, self.unfiltered().__class__):
+- pass
+- return filteredrepo(self, name)
++ # Python <3.4 easily leaks types via __mro__. See
++ # https://bugs.python.org/issue17950. We cache dynamically
++ # created types so this method doesn't leak on every
++ # invocation.
++
++ key = self.unfiltered().__class__
++ if key not in self._filteredrepotypes:
++ # Build a new type with the repoview mixin and the base
++ # class of this repo. Give it a name containing the
++ # filter name to aid debugging.
++ bases = (repoview.repoview, key)
++ cls = type('%sfilteredrepo' % name, bases, {})
++ self._filteredrepotypes[key] = cls
++
++ return self._filteredrepotypes[key](self, name)
+
+ @repofilecache('bookmarks', 'bookmarks.current')
+ def _bookmarks(self):
Index: pkgsrc/devel/py-mercurial/patches/patch-mercurial_statichttprepo.py
diff -u /dev/null pkgsrc/devel/py-mercurial/patches/patch-mercurial_statichttprepo.py:1.1
--- /dev/null Tue Jul 25 16:09:40 2017
+++ pkgsrc/devel/py-mercurial/patches/patch-mercurial_statichttprepo.py Tue Jul 25 16:09:40 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-mercurial_statichttprepo.py,v 1.1 2017/07/25 16:09:40 joerg Exp $
+
+https://www.mercurial-scm.org/repo/hg/rev/7e89b
+
+--- mercurial/statichttprepo.py.orig 2017-06-04 13:16:29.000000000 +0000
++++ mercurial/statichttprepo.py
+@@ -164,6 +164,8 @@ class statichttprepository(localrepo.loc
+ self.encodepats = None
+ self.decodepats = None
+ self._transref = None
++ # Cache of types representing filtered repos.
++ self._filteredrepotypes = {}
+
+ def _restrictcapabilities(self, caps):
+ caps = super(statichttprepository, self)._restrictcapabilities(caps)
Home |
Main Index |
Thread Index |
Old Index