Rev 952: Add svn_raversion() wrapper. in file:///data/jelmer/bzr-svn/pyrex/

Jelmer Vernooij jelmer at samba.org
Thu Mar 13 14:17:55 GMT 2008


At file:///data/jelmer/bzr-svn/pyrex/

------------------------------------------------------------
revno: 952
revision-id:jelmer at samba.org-20080313141754-xj1d0zjnyepv8obx
parent: jelmer at samba.org-20080313141031-ww9rf41ga41x1c42
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: pyrex
timestamp: Thu 2008-03-13 15:17:54 +0100
message:
  Add svn_raversion() wrapper.
added:
  tests/test_ra.py               test_ra.py-20080313141743-uzsm7ejitrlqone5-1
modified:
  Makefile                       makefile.other-20080311181537-5svhje3v1flh1n4f-1
  ra.pyx                         ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
  tests/__init__.py              __init__.py-20060508151940-e9f4d914801a2535
=== modified file 'Makefile'
--- a/Makefile	2008-03-11 18:16:09 +0000
+++ b/Makefile	2008-03-13 14:17:54 +0000
@@ -9,6 +9,9 @@
 build::
 	$(SETUP) build
 
+build-inplace::
+	$(SETUP) build_ext --inplace
+
 install::
 	$(SETUP) install
 
@@ -20,7 +23,7 @@
 $(TMP_PLUGINS_DIR):
 	mkdir -p $@
 
-$(TMP_PLUGINS_DIR)/svn: $(TMP_PLUGINS_DIR)
+$(TMP_PLUGINS_DIR)/svn: build-inplace $(TMP_PLUGINS_DIR)
 	ln -sf `pwd` $(TMP_PLUGINS_DIR)/svn
 
 check:: $(TMP_PLUGINS_DIR)/svn

=== modified file 'ra.pyx'
--- a/ra.pyx	2008-03-13 14:10:31 +0000
+++ b/ra.pyx	2008-03-13 14:17:54 +0000
@@ -7,3 +7,11 @@
 
 cdef extern from "svn_ra.h":
 	svn_version_t *svn_ra_version()
+
+def version():
+	"""Get libsvn_ra version information.
+
+	:return: tuple with major, minor, patch version number and tag.
+	"""
+	return (svn_ra_version().major, svn_ra_version().minor, 
+			svn_ra_version().minor, svn_ra_version().tag)

=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2008-03-12 15:01:25 +0000
+++ b/tests/__init__.py	2008-03-13 14:17:54 +0000
@@ -294,6 +294,7 @@
             'test_logwalker',
             'test_mapping',
             'test_push',
+            'test_ra',
             'test_radir',
             'test_repos', 
             'test_revids',

=== added file 'tests/test_ra.py'
--- a/tests/test_ra.py	1970-01-01 00:00:00 +0000
+++ b/tests/test_ra.py	2008-03-13 14:17:54 +0000
@@ -0,0 +1,24 @@
+# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer at samba.org>
+ 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+"""Subversion ra library tests."""
+
+from bzrlib.tests import TestCase
+import ra
+
+class VersionTest(TestCase):
+    def test_version_length(self):
+        self.assertEquals(4, len(ra.version()))
+




More information about the bazaar-commits mailing list