Rev 954: Add wc wrapper. in file:///data/jelmer/bzr-svn/pyrex/
Jelmer Vernooij
jelmer at samba.org
Thu Mar 13 14:23:55 GMT 2008
At file:///data/jelmer/bzr-svn/pyrex/
------------------------------------------------------------
revno: 954
revision-id:jelmer at samba.org-20080313142355-3dryi7ev623917ng
parent: jelmer at samba.org-20080313141845-7iq1vib7xig08j17
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: pyrex
timestamp: Thu 2008-03-13 15:23:55 +0100
message:
Add wc wrapper.
added:
tests/test_wc.py test_wc.py-20080313142315-woibd1cdv4s2lr7o-1
wc.pyx wc.pyx-20080313142018-10l8l23vha2j9e6b-1
modified:
ra.pyx ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
setup.py setup.py-20060502115218-86950492da22353f
tests/__init__.py __init__.py-20060508151940-e9f4d914801a2535
=== modified file 'ra.pyx'
--- a/ra.pyx 2008-03-13 14:17:54 +0000
+++ b/ra.pyx 2008-03-13 14:23:55 +0000
@@ -1,3 +1,19 @@
+# Copyright (C) 2008 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 2 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
cdef extern from "svn_version.h":
ctypedef struct svn_version_t:
int major
=== modified file 'setup.py'
--- a/setup.py 2008-03-13 14:10:31 +0000
+++ b/setup.py 2008-03-13 14:23:55 +0000
@@ -35,5 +35,7 @@
'bzrlib.plugins.svn.tests'],
ext_modules=[Extension("ra", ["ra.pyx"], libraries=["svn_ra-1"],
include_dirs=[apr_include_dir(), svn_include_dir()])],
+ ext_modules=[Extension("wc", ["wc.pyx"], libraries=["svn_wc-1"],
+ include_dirs=[apr_include_dir(), svn_include_dir()])],
cmdclass = {'build_ext': build_ext},
)
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py 2008-03-13 14:17:54 +0000
+++ b/tests/__init__.py 2008-03-13 14:23:55 +0000
@@ -304,6 +304,7 @@
'test_transport',
'test_tree',
'test_upgrade',
+ 'test_wc',
'test_workingtree',
'test_blackbox']
suite.addTest(loader.loadTestsFromModuleNames(["%s.%s" % (__name__, i) for i in testmod_names]))
=== added file 'tests/test_wc.py'
--- a/tests/test_wc.py 1970-01-01 00:00:00 +0000
+++ b/tests/test_wc.py 2008-03-13 14:23:55 +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()))
+
=== added file 'wc.pyx'
--- a/wc.pyx 1970-01-01 00:00:00 +0000
+++ b/wc.pyx 2008-03-13 14:23:55 +0000
@@ -0,0 +1,35 @@
+# Copyright (C) 2008 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 2 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+cdef extern from "svn_version.h":
+ ctypedef struct svn_version_t:
+ int major
+ int minor
+ int patch
+ char *tag
+
+
+cdef extern from "svn_wc.h":
+ svn_version_t *svn_wc_version()
+
+
+def version():
+ """Get libsvn_wc 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)
More information about the bazaar-commits
mailing list