Diff below brings git-cola to the latest version (3.1). Overview on
fixes and additions can be found at
https://github.com/git-cola/git-cola/blob/master/share/doc/git-cola/relnotes.rst

- upstream switched to py.test to execute the test suite instead of
  nosetests
- instead of patching Makefile to make it compatible with OpenBSD's
  make just switch to gnake. The patch is too big, and too hard to
  maintain
- drop patch which has been committed upstream

make test runs successfully, and (lightly) tested on amd64.

Comments/OKs?


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/git-cola/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- Makefile    18 Feb 2018 11:35:48 -0000      1.21
+++ Makefile    30 Apr 2018 18:27:59 -0000
@@ -2,7 +2,7 @@
 
 COMMENT =      python powered git gui
 
-MODPY_EGG_VERSION=     3.0
+MODPY_EGG_VERSION=     3.1
 DISTNAME =     ${GH_PROJECT}-${MODPY_EGG_VERSION}
 
 GH_ACCOUNT =   git-cola
@@ -29,7 +29,9 @@ RUN_DEPENDS = devel/desktop-file-utils \
                x11/py-qt4
 
 TEST_DEPENDS = devel/py-mock \
-               devel/py-nose
+               devel/py-test
+
+USE_GMAKE =    Yes
 
 MODPY_ADJ_FILES= share/git-cola/bin/git-xbase
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/git-cola/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- distinfo    18 Feb 2018 11:35:48 -0000      1.8
+++ distinfo    30 Apr 2018 18:27:59 -0000
@@ -1,2 +1,2 @@
-SHA256 (git-cola-3.0.tar.gz) = YZWPmY1GGOCc4N1HNBGSGBjRPfg48yEC713tmEoNGlA=
-SIZE (git-cola-3.0.tar.gz) = 1218820
+SHA256 (git-cola-3.1.tar.gz) = p6CD+EaXpW7nyRDM/GgNNsXER8a1o1IuAb/53pFHT1c=
+SIZE (git-cola-3.1.tar.gz) = 1179782
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/devel/git-cola/patches/patch-Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 patch-Makefile
--- patches/patch-Makefile      18 Feb 2018 11:35:48 -0000      1.3
+++ patches/patch-Makefile      30 Apr 2018 18:27:59 -0000
@@ -1,8 +1,6 @@
 $OpenBSD: patch-Makefile,v 1.3 2018/02/18 11:35:48 bket Exp $
 
-Avoid dep on gnu make
-
-Avoid use of nosetest --with-doctest as this causes a regression test to fail
+Avoid use of pytest --with-doctest as this causes a regression test to fail
 with "ImportError (Could not load inotify functions from libc)". Failure is
 caused by the doctest module testing a piece of code that is linux-only. This
 code is not used when running git-cola on OpenBSD.
@@ -10,39 +8,12 @@ code is not used when running git-cola o
 Index: Makefile
 --- Makefile.orig
 +++ Makefile
-@@ -26,9 +26,6 @@ TAR = tar
- # Flags
+@@ -53,7 +53,7 @@ ifdef V
+ else
+     QUIET = --quiet
+ endif
+-PYTEST_FLAGS = $(QUIET) $(TEST_VERBOSE) --doctest-modules
++PYTEST_FLAGS = $(QUIET) $(TEST_VERBOSE)
  FLAKE8_FLAGS = --max-line-length=80 --statistics --doctests --format=pylint
  PYLINT_FLAGS = --rcfile=.pylintrc
--ifdef color
--    PYLINT_FLAGS += --output-format=colorized
--endif
- 
- # These values can be overridden on the command-line or via config.mak
- prefix = $(HOME)
-@@ -44,7 +41,6 @@ cola_app = $(CURDIR)/$(cola_app_base)
- cola_version = $(shell $(PYTHON) bin/git-cola version --brief)
- cola_dist := $(cola_base)-$(cola_version)
- 
--NOSE_FLAGS = --with-doctest
- NOSE_FLAGS += --with-id
- NOSE_FLAGS += --exclude=sphinxtogithub
- NOSE_FLAGS += --exclude=extras
-@@ -59,16 +55,7 @@ setup_args += --force
- setup_args += --install-scripts=$(bindir)
- setup_args += --record=build/MANIFEST
- setup_args += --install-lib=$(coladir)
--ifdef DESTDIR
--    setup_args += --root=$(DESTDIR)
--    export DESTDIR
--endif
--export prefix
--
--# If NO_VENDOR_LIBS is specified on the command line then pass it to setup.py
--ifdef NO_VENDOR_LIBS
--    setup_args += --no-vendor-libs
--endif
-+setup_args += --root=$(DESTDIR)
- 
- PYTHON_DIRS = cola
- PYTHON_DIRS += test
+ ifdef color
Index: patches/patch-cola_app_py
===================================================================
RCS file: /cvs/ports/devel/git-cola/patches/patch-cola_app_py,v
retrieving revision 1.3
diff -u -p -r1.3 patch-cola_app_py
--- patches/patch-cola_app_py   18 Feb 2018 11:35:48 -0000      1.3
+++ patches/patch-cola_app_py   30 Apr 2018 18:27:59 -0000
@@ -5,7 +5,7 @@ Use ssh-askpass implementation from xeno
 Index: cola/app.py
 --- cola/app.py.orig
 +++ cola/app.py
-@@ -81,7 +81,7 @@ def setup_environment():
+@@ -86,7 +86,7 @@ def setup_environment():
      elif sys.platform == 'darwin':
          askpass = resources.share('bin', 'ssh-askpass-darwin')
      else:
Index: patches/patch-test_git_test_py
===================================================================
RCS file: patches/patch-test_git_test_py
diff -N patches/patch-test_git_test_py
--- patches/patch-test_git_test_py      18 Feb 2018 11:35:48 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,31 +0,0 @@
-$OpenBSD: patch-test_git_test_py,v 1.1 2018/02/18 11:35:48 bket Exp $
-
-test_tag and test_show assume that source has been fetched using git, and that
-full history is availabe. These tests fail as we are using a release tarball.
-
-Adapted from
-https://github.com/git-cola/git-cola/commit/4c9d36ae021262a6559a1ae240c31e768bca0b37
-
-Index: test/git_test.py
---- test/git_test.py.orig
-+++ test/git_test.py
-@@ -219,19 +219,6 @@ class GitCommandTest(unittest.TestCase):
-         version = self.git.version()[STDOUT]
-         self.failUnless(version.startswith('git version'))
- 
--    def test_tag(self):
--        """Test running 'git tag'"""
--        tags = self.git.tag()[STDOUT].splitlines()
--        if os.getenv('GIT_COLA_NO_HISTORY', False):
--            return
--        self.failUnless('v1.0.0' in tags)
--
--    def test_show(self):
--        """Test running 'git show'"""
--        oid = 'HEAD'
--        content = self.git.show(oid)[STDOUT]
--        self.failUnless(content.startswith('commit '))
--
-     def test_stdout(self):
-         """Test overflowing the stdout buffer"""
-         # Write to stdout only
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/git-cola/pkg/PLIST,v
retrieving revision 1.10
diff -u -p -r1.10 PLIST
--- pkg/PLIST   18 Feb 2018 11:35:48 -0000      1.10
+++ pkg/PLIST   30 Apr 2018 18:27:59 -0000
@@ -51,6 +51,7 @@ share/git-cola/icons/dark/folder.svg
 share/git-cola/icons/dark/gear.svg
 share/git-cola/icons/dark/git-branch.svg
 share/git-cola/icons/dark/git-cola.svg
+share/git-cola/icons/dark/git-commit.svg
 share/git-cola/icons/dark/git-compare.svg
 share/git-cola/icons/dark/git-merge.svg
 share/git-cola/icons/dark/link-external.svg
@@ -98,6 +99,7 @@ share/git-cola/icons/folder.svg
 share/git-cola/icons/gear.svg
 share/git-cola/icons/git-branch.svg
 share/git-cola/icons/git-cola.svg
+share/git-cola/icons/git-commit.svg
 share/git-cola/icons/git-compare.svg
 share/git-cola/icons/git-merge.svg
 share/git-cola/icons/link-external.svg
@@ -141,6 +143,8 @@ share/git-cola/lib/cola/compat.py
 share/git-cola/lib/cola/compat.pyc
 share/git-cola/lib/cola/core.py
 share/git-cola/lib/cola/core.pyc
+share/git-cola/lib/cola/dag.py
+share/git-cola/lib/cola/dag.pyc
 share/git-cola/lib/cola/decorators.py
 share/git-cola/lib/cola/decorators.pyc
 share/git-cola/lib/cola/diffparse.py
@@ -221,6 +225,8 @@ share/git-cola/lib/cola/widgets/browse.p
 share/git-cola/lib/cola/widgets/browse.pyc
 share/git-cola/lib/cola/widgets/cfgactions.py
 share/git-cola/lib/cola/widgets/cfgactions.pyc
+share/git-cola/lib/cola/widgets/clone.py
+share/git-cola/lib/cola/widgets/clone.pyc
 share/git-cola/lib/cola/widgets/commitmsg.py
 share/git-cola/lib/cola/widgets/commitmsg.pyc
 share/git-cola/lib/cola/widgets/common.py
@@ -253,6 +259,8 @@ share/git-cola/lib/cola/widgets/grep.py
 share/git-cola/lib/cola/widgets/grep.pyc
 share/git-cola/lib/cola/widgets/highlighter.py
 share/git-cola/lib/cola/widgets/highlighter.pyc
+share/git-cola/lib/cola/widgets/imageview.py
+share/git-cola/lib/cola/widgets/imageview.pyc
 share/git-cola/lib/cola/widgets/log.py
 share/git-cola/lib/cola/widgets/log.pyc
 share/git-cola/lib/cola/widgets/main.py

Reply via email to