Rev 455: Fix the build. in file:///data/jelmer/bzr-svn/nestedtrees/

Jelmer Vernooij jelmer at samba.org
Tue Jul 8 02:09:05 BST 2008


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

------------------------------------------------------------
revno: 455
revision-id: jelmer at samba.org-20080708010904-3y5ndpn9xvz0und6
parent: jelmer at samba.org-20080708004856-f52wpm1a1f3t4f8m
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: nestedtrees
timestamp: Tue 2008-07-08 03:09:04 +0200
message:
  Fix the build.
modified:
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
  tree.py                        tree.py-20060624222557-dudlwqcmkf22lt2s-1
  wc.c                           wc.pyx-20080313142018-10l8l23vha2j9e6b-1
=== modified file 'fetch.py'
--- a/fetch.py	2008-07-08 00:48:56 +0000
+++ b/fetch.py	2008-07-08 01:09:04 +0000
@@ -207,6 +207,7 @@
         self.old_id = old_id
         self.new_id = new_id
         self.parent_revids = parent_revids
+        self.externals = None
 
     def close(self):
         self.editor.inventory[self.new_id].revision = self.editor.revid
@@ -215,10 +216,10 @@
         self.editor.texts.add_lines((self.new_id, self.editor.revid), 
                  [(self.new_id, revid) for revid in self.parent_revids], [])
 
-        if self.externals.has_key(id):
+        if self.externals is not None:
             # Add externals. This happens after all children have been added
             # as they can be grandchildren.
-            for (name, (rev, url)) in self.externals[id].items():
+            for (name, (rev, url)) in self.externals.items():
                 inventory_add_external(self.inventory, id, name, self.revid, rev, url)
             # FIXME: Externals could've disappeared or only changed. Need 
             # to keep track of them.
@@ -286,6 +287,8 @@
             self.editor.revmeta.fileprops[name] = value
 
         if name == properties.PROP_EXTERNALS:
+            if value is not None:
+                value = ""
             self.externals = parse_externals_description(
                 urlutils.join(self.source.base, self.inventory.id2path(id)),
                 value)

=== modified file 'tree.py'
--- a/tree.py	2008-07-08 00:48:56 +0000
+++ b/tree.py	2008-07-08 01:09:04 +0000
@@ -74,14 +74,15 @@
         self._inventory = Inventory()
         self.id_map = repository.get_fileid_map(self.revnum, self.branch_path, 
                                                 mapping)
-        editor = TreeBuildEditor(self)
+        root_repos = repository.transport.get_svn_repos_root()
+        branch_url = urlutils.join(root_repos, self.branch_path)
+        editor = TreeBuildEditor(self, branch_url)
         self.file_data = {}
-        root_repos = repository.transport.get_svn_repos_root()
         conn = repository.transport.get_connection()
         try:
             reporter = conn.do_switch(
                 self.revnum, "", True, 
-                urlutils.join(root_repos, self.branch_path), editor)
+                branch_url, editor)
             reporter.set_path("", 0, True, None)
             reporter.finish()
         finally:
@@ -95,10 +96,10 @@
 
 class TreeBuildEditor(object):
     """Builds a tree given Subversion tree transform calls."""
-    def __init__(self, base, tree):
+    def __init__(self, tree, base):
         self.base = base
         self.tree = tree
-        self.repository = tree._repository
+        self.repository = self.tree._repository
         self.externals = None
 
     def set_target_revision(self, revnum):
@@ -122,6 +123,7 @@
     def __init__(self, tree, file_id):
         self.tree = tree
         self.file_id = file_id
+        self.externals = None
 
     def add_directory(self, path, copyfrom_path=None, copyfrom_revnum=-1):
         path = path.decode("utf-8")
@@ -131,7 +133,7 @@
         return DirectoryTreeEditor(self.tree, file_id)
 
     def change_prop(self, name, value):
-        if name == svn.core.SVN_PROP_EXTERNALS:
+        if name == properties.PROP_EXTERNALS:
             self.externals = parse_externals_description(
                 urlutils.join(self.editor.base, self.tree._inventory.id2path(self.file_id)),
                 value)

=== modified file 'wc.c'
--- a/wc.c	2008-07-04 04:46:58 +0000
+++ b/wc.c	2008-07-08 01:09:04 +0000
@@ -19,6 +19,7 @@
 #include <Python.h>
 #include <apr_general.h>
 #include <svn_wc.h>
+#include <svn_path.h>
 #include <structmember.h>
 #include <stdbool.h>
 
@@ -425,7 +426,7 @@
 	if (temp_pool == NULL)
 		return NULL;
 	RUN_SVN_WITH_POOL(temp_pool, svn_wc_get_prop_diffs(&propchanges, &original_props, 
-				path, admobj->adm, temp_pool));
+				svn_path_canonicalize(path, temp_pool), admobj->adm, temp_pool));
 	py_propchanges = PyList_New(propchanges->nelts);
 	for (i = 0; i < propchanges->nelts; i++) {
 		el = APR_ARRAY_IDX(propchanges, i, svn_prop_t);




More information about the bazaar-commits mailing list