Rev 1627: More error checks. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk

Jelmer Vernooij jelmer at samba.org
Sun Aug 24 04:34:11 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/trunk

------------------------------------------------------------
revno: 1627
revision-id: jelmer at samba.org-20080824033405-k4yc6vde2fk9wmv8
parent: jelmer at samba.org-20080823214157-0qjr3cwu8r03likr
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-24 05:34:05 +0200
message:
  More error checks.
modified:
  mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
  repos.c                        repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
=== modified file 'mapping3/__init__.py'
--- a/mapping3/__init__.py	2008-08-23 21:41:57 +0000
+++ b/mapping3/__init__.py	2008-08-24 03:34:05 +0000
@@ -302,8 +302,7 @@
         return (uuid, branch_path, srevnum, cls(scheme))
 
     def is_branch(self, branch_path):
-        return (self.scheme.is_branch(branch_path) or 
-                self.scheme.is_tag(branch_path))
+        return self.scheme.is_branch(branch_path)
 
     def is_tag(self, tag_path):
         return self.scheme.is_tag(tag_path)

=== modified file 'repos.c'
--- a/repos.c	2008-08-01 20:55:49 +0000
+++ b/repos.c	2008-08-24 03:34:05 +0000
@@ -49,7 +49,13 @@
 	if (pool == NULL)
 		return NULL;
     hash_config = config_hash_from_object(config, pool);
+	if (hash_config == NULL)
+		return NULL;
     hash_fs_config = apr_hash_make(pool); /* FIXME */
+	if (hash_fs_config == NULL) {
+		PyErr_SetString(PyExc_RuntimeError, "Unable to create fs config hash");
+		return NULL;
+	}
     RUN_SVN_WITH_POOL(pool, svn_repos_create(&repos, path, NULL, NULL, 
                 hash_config, hash_fs_config, pool));
 




More information about the bazaar-commits mailing list