diff options
author | richard <richard@pkgsrc.org> | 2015-12-21 13:19:17 +0000 |
---|---|---|
committer | richard <richard@pkgsrc.org> | 2015-12-21 13:19:17 +0000 |
commit | db8d4672bdd8c2abc1155f19c29832d0b7429703 (patch) | |
tree | 59c1072d6890af25ce95ca48542ab8c29421180f /devel | |
parent | d82ebb2e7c9e3020a0fe680ca93c875e9a4f358d (diff) | |
download | pkgsrc-db8d4672bdd8c2abc1155f19c29832d0b7429703.tar.gz |
From upstream https://bz.mercurial-scm.org/show_bug.cgi?id=4943
# Files opened in a+ mode have inconsistent behavior on various
# platforms. Windows requires that a file positioning call be made
# when the file handle transitions between reads and writes. See
# 3686fa2b8eee and the mixedfilemodewrapper in windows.py. On other
# platforms, Python or the platform itself can be buggy. Some versions
# of Solaris have been observed to not append at the end of the file
# if the file was seeked to before the end. See issue4943 for more.
#
# We work around this issue by inserting a seek() before writing.
# Note: This is likely not necessary on Python 3.
bump PKGREVISION
okay'd by wiz@
Diffstat (limited to 'devel')
-rw-r--r-- | devel/py-mercurial/Makefile | 3 | ||||
-rw-r--r-- | devel/py-mercurial/distinfo | 3 | ||||
-rw-r--r-- | devel/py-mercurial/patches/patch-mercurial_revlog.py | 33 |
3 files changed, 37 insertions, 2 deletions
diff --git a/devel/py-mercurial/Makefile b/devel/py-mercurial/Makefile index 5a2f209f3d2..a6dff3b42c3 100644 --- a/devel/py-mercurial/Makefile +++ b/devel/py-mercurial/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.7 2015/09/02 16:52:37 wiz Exp $ +# $NetBSD: Makefile,v 1.8 2015/12/21 13:19:17 richard Exp $ DISTNAME= mercurial-${VERSION} PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +PKGREVISION= 1 CATEGORIES= devel scm MASTER_SITES= https://mercurial.selenic.com/release/ diff --git a/devel/py-mercurial/distinfo b/devel/py-mercurial/distinfo index 1f8aebe7982..a7e01a89ead 100644 --- a/devel/py-mercurial/distinfo +++ b/devel/py-mercurial/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.27 2015/12/05 11:22:32 wiz Exp $ +$NetBSD: distinfo,v 1.28 2015/12/21 13:19:17 richard Exp $ SHA1 (mercurial-3.6.2.tar.gz) = 1dbf5d9d42f70f1fb0b26f8e659a1b7879bc1533 RMD160 (mercurial-3.6.2.tar.gz) = 0671aa8429befbc9b049cb640a54d4c810103f56 SHA512 (mercurial-3.6.2.tar.gz) = 2ad780174a30c39a1482d597466523a133b8c62a3a0eb9ac3b183082e279fc624998a9ffa520abafe5f7afc7d9f4600f443ad4dfa1003bd7fdc6b713040091ed Size (mercurial-3.6.2.tar.gz) = 4518349 bytes +SHA1 (patch-mercurial_revlog.py) = 2c6ba5325480d6a6c025e00fe7903eb007069e1f diff --git a/devel/py-mercurial/patches/patch-mercurial_revlog.py b/devel/py-mercurial/patches/patch-mercurial_revlog.py new file mode 100644 index 00000000000..4fc7a18011c --- /dev/null +++ b/devel/py-mercurial/patches/patch-mercurial_revlog.py @@ -0,0 +1,33 @@ +$NetBSD: patch-mercurial_revlog.py,v 1.1 2015/12/21 13:19:17 richard Exp $ +https://bz.mercurial-scm.org/show_bug.cgi?id=4943 +--- mercurial/revlog.py.orig 2015-12-02 02:18:26.000000000 +0000 ++++ mercurial/revlog.py +@@ -13,6 +13,7 @@ and O(changes) merge between branches. + + # import stuff from node for others to import from revlog + import collections ++import os + from node import bin, hex, nullid, nullrev + from i18n import _ + import ancestor, mdiff, parsers, error, util, templatefilters +@@ -1426,6 +1427,20 @@ class revlog(object): + return node + + def _writeentry(self, transaction, ifh, dfh, entry, data, link, offset): ++ # Files opened in a+ mode have inconsistent behavior on various ++ # platforms. Windows requires that a file positioning call be made ++ # when the file handle transitions between reads and writes. See ++ # 3686fa2b8eee and the mixedfilemodewrapper in windows.py. On other ++ # platforms, Python or the platform itself can be buggy. Some versions ++ # of Solaris have been observed to not append at the end of the file ++ # if the file was seeked to before the end. See issue4943 for more. ++ # ++ # We work around this issue by inserting a seek() before writing. ++ # Note: This is likely not necessary on Python 3. ++ ifh.seek(0, os.SEEK_END) ++ if dfh: ++ dfh.seek(0, os.SEEK_END) ++ + curr = len(self) - 1 + if not self._inline: + transaction.add(self.datafile, offset) |