From owner-svn-ports-all@freebsd.org Tue May 28 20:01:04 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48A9815AA852; Tue, 28 May 2019 20:01:04 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB32E8F14B; Tue, 28 May 2019 20:01:03 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B59AB1F166; Tue, 28 May 2019 20:01:03 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4SK13sW052083; Tue, 28 May 2019 20:01:03 GMT (envelope-from cpm@FreeBSD.org) Received: (from cpm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4SK13dH052081; Tue, 28 May 2019 20:01:03 GMT (envelope-from cpm@FreeBSD.org) Message-Id: <201905282001.x4SK13dH052081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cpm set sender to cpm@FreeBSD.org using -f From: "Carlos J. Puga Medina" Date: Tue, 28 May 2019 20:01:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r502909 - in head/devel/py-gitless: . files X-SVN-Group: ports-head X-SVN-Commit-Author: cpm X-SVN-Commit-Paths: in head/devel/py-gitless: . files X-SVN-Commit-Revision: 502909 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DB32E8F14B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2019 20:01:04 -0000 Author: cpm Date: Tue May 28 20:01:03 2019 New Revision: 502909 URL: https://svnweb.freebsd.org/changeset/ports/502909 Log: - Fix gl crash after upgrade pygit2 to 0.27.4 While here, pet portlint. Added: head/devel/py-gitless/files/ head/devel/py-gitless/files/patch-gitless_core.py (contents, props changed) Modified: head/devel/py-gitless/Makefile Modified: head/devel/py-gitless/Makefile ============================================================================== --- head/devel/py-gitless/Makefile Tue May 28 19:52:07 2019 (r502908) +++ head/devel/py-gitless/Makefile Tue May 28 20:01:03 2019 (r502909) @@ -3,8 +3,8 @@ PORTNAME= gitless PORTVERSION= 0.8.6 -PORTREVISION= 1 DISTVERSIONPREFIX= v +PORTREVISION= 2 CATEGORIES= devel python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Added: head/devel/py-gitless/files/patch-gitless_core.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-gitless/files/patch-gitless_core.py Tue May 28 20:01:03 2019 (r502909) @@ -0,0 +1,55 @@ +--- gitless/core.py.orig 2019-05-28 19:39:17 UTC ++++ gitless/core.py +@@ -58,6 +58,13 @@ GL_STATUS_TRACKED = 2 + GL_STATUS_IGNORED = 3 + + ++def error_on_none(path): ++ """Raise a KeyError if the ```path``` argument is None.""" ++ if path is None: ++ raise KeyError('path') ++ return path ++ ++ + def init_repository(url=None): + """Creates a new Gitless's repository in the cwd. + +@@ -67,7 +74,7 @@ def init_repository(url=None): + """ + cwd = os.getcwd() + try: +- pygit2.discover_repository(cwd) ++ error_on_none(pygit2.discover_repository(cwd)) + raise GlError('You are already in a Gitless repository') + except KeyError: # Expected + if not url: +@@ -108,7 +115,7 @@ class Repository(object): + def __init__(self): + """Create a Repository out of the current working repository.""" + try: +- path = pygit2.discover_repository(os.getcwd()) ++ path = error_on_none(pygit2.discover_repository(os.getcwd())) + except KeyError: + raise NotInRepoError('You are not in a Gitless\'s repository') + +@@ -1333,10 +1340,18 @@ OpCb = collections.namedtuple( + 'OpCb', ['apply_ok', 'apply_err', 'save', 'restore_ok']) + + def stdout(p): +- return p.stdout.decode(ENCODING) ++ try: ++ pstdout = p.stdout.decode(ENCODING) ++ except AttributeError: ++ pstdout = p.stdout ++ return pstdout + + def stderr(p): +- return p.stderr.decode(ENCODING) ++ try: ++ pstderr = p.stderr.decode(ENCODING) ++ except AttributeError: ++ pstderr = p.stderr ++ return pstderr + + def walker(git_repo, target, reverse): + flags = pygit2.GIT_SORT_TOPOLOGICAL | pygit2.GIT_SORT_TIME