Rev 971: Start working on repos.pyx. in file:///data/jelmer/bzr-svn/pyrex/

Jelmer Vernooij jelmer at samba.org
Fri Mar 14 11:44:45 GMT 2008


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

------------------------------------------------------------
revno: 971
revision-id:jelmer at samba.org-20080314114445-nzp99qzfzqhffo2q
parent: jelmer at samba.org-20080314111415-aw0ritbpr7kbc79b
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: pyrex
timestamp: Fri 2008-03-14 12:44:45 +0100
message:
  Start working on repos.pyx.
added:
  repos.pyx                      repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
modified:
  convert.py                     svn2bzr.py-20051018015439-cb4563bff29e632d
  wc.pyx                         wc.pyx-20080313142018-10l8l23vha2j9e6b-1
=== modified file 'convert.py'
--- a/convert.py	2008-03-13 21:04:01 +0000
+++ b/convert.py	2008-03-14 11:44:45 +0000
@@ -25,7 +25,7 @@
 
 from format import get_rich_root_format
 
-import core, svn.repos
+import core, repos
 
 def transport_makedirs(transport, location_url):
     """Create missing directories.
@@ -61,7 +61,7 @@
         created.
     """
     from cStringIO import StringIO
-    repos = svn.repos.svn_repos_create(outputdir, '', '', None, None)
+    repos = repos.svn_repos_create(outputdir, '', '', None, None)
     if dumpfile.endswith(".gz"):
         import gzip
         file = gzip.GzipFile(dumpfile)

=== added file 'repos.pyx'
--- a/repos.pyx	1970-01-01 00:00:00 +0000
+++ b/repos.pyx	2008-03-14 11:44:45 +0000
@@ -0,0 +1,28 @@
+# 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
+
+from apr cimport apr_pool_t, apr_hash_t
+
+cdef extern from "svn_repos.h":
+	ctypedef struct svn_repos_t
+	svn_error_t *svn_repos_create(svn_repos_t **repos_p, 
+                              char *path,
+                              char *unused_1,
+                              char *unused_2,
+                              apr_hash_t *config,
+                              apr_hash_t *fs_config,
+                              apr_pool_t *pool)
+

=== modified file 'wc.pyx'
--- a/wc.pyx	2008-03-14 00:47:07 +0000
+++ b/wc.pyx	2008-03-14 11:44:45 +0000
@@ -15,7 +15,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 from apr cimport apr_pool_t, apr_initialize, apr_hash_t, apr_pool_destroy
-from types cimport svn_error_t, svn_version_t, svn_boolean_t, svn_cancel_func_t , svn_string_t
+from types cimport svn_error_t, svn_version_t, svn_boolean_t, svn_cancel_func_t , svn_string_t, svn_string_ncreate
 
 from core cimport check_error, Pool, py_cancel_func
 
@@ -57,6 +57,16 @@
                                  svn_wc_adm_access_t *adm_access,
                                  svn_boolean_t show_hidden,
                                  apr_pool_t *pool)
+    svn_error_t *svn_wc_prop_set2(char *name,
+                              svn_string_t *value,
+                              char *path,
+                              svn_wc_adm_access_t *adm_access,
+                              svn_boolean_t skip_checks,
+                              apr_pool_t *pool)
+
+    svn_boolean_t svn_wc_is_normal_prop(char *name)
+    svn_boolean_t svn_wc_is_wc_prop(char *name)
+    svn_boolean_t svn_wc_is_entry_prop(char *name)
 
 def version():
     """Get libsvn_wc version information.
@@ -92,6 +102,15 @@
         apr_pool_destroy(temp_pool)
         return ret
 
+    def prop_set(self, name, value, path, skip_checks=False):
+        cdef apr_pool_t *temp_pool
+        cdef svn_string_t *cvalue
+        temp_pool = Pool(self.pool)
+        cvalue = svn_string_ncreate(value, len(value), temp_pool)
+        check_error(svn_wc_prop_set2(name, cvalue, path, self.adm, 
+                    skip_checks, temp_pool))
+        apr_pool_destroy(temp_pool)
+
     def entries_read(self, show_hidden):
         cdef apr_hash_t *entries
         cdef apr_pool_t *temp_pool
@@ -118,4 +137,11 @@
     apr_pool_destroy(temp_pool)
     return ret
 
-
+cdef is_normal_prop(name):
+    return svn_wc_is_normal_prop(name)
+
+cdef is_wc_prop(name):
+    return svn_wc_is_wc_prop(name)
+
+cdef is_entry_prop(name):
+    return svn_wc_is_entry_prop(name)




More information about the bazaar-commits mailing list