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

------------------------------------------------------------
revno: 1987
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: 0.5
timestamp: Sun 2008-11-16 17:13:12 +0100
message:
  Revert back to using wc.process_committed(), we can't simply update.
modified:
  workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'workingtree.py'
--- a/workingtree.py    2008-11-15 00:50:35 +0000
+++ b/workingtree.py    2008-11-16 16:13:12 +0000
@@ -704,8 +704,46 @@
         newrevtree = self.branch.repository.revision_tree(new_revid)
         svn_revprops = self.branch.repository._log.revprop_list(rev)
 
+        def update_settings(wc, path):
+            id = newrevtree.inventory.path2id(path)
+            mutter("Updating settings for %r", id)
+            revnum = self.branch.lookup_revision_id(
+                    newrevtree.inventory[id].revision)
+
+            if newrevtree.inventory[id].kind != 'directory':
+                return
+
+            entries = wc.entries_read(True)
+            for name, entry in entries.items():
+                if name == "":
+                    continue
+
+                wc.process_committed(self.abspath(path).rstrip("/"), 
+                              False, 
self.branch.lookup_revision_id(newrevtree.inventory[id].revision),
+                              svn_revprops[properties.PROP_REVISION_DATE], 
+                              
svn_revprops.get(properties.PROP_REVISION_AUTHOR, ""))
+
+                child_path = os.path.join(path, name.decode("utf-8"))
+
+                fileid = newrevtree.inventory.path2id(child_path)
+
+                if newrevtree.inventory[fileid].kind == 'directory':
+                    subwc = WorkingCopy(wc, 
self.abspath(child_path).rstrip("/"), write_lock=True)
+                    try:
+                        update_settings(subwc, child_path)
+                    finally:
+                        subwc.close()
+
         # Set proper version for all files in the wc
-        self._update(self.branch.lookup_revision_id(new_revid))
+        wc = self._get_wc(write_lock=True)
+        try:
+            wc.process_committed(self.basedir,
+                          False, 
self.branch.lookup_revision_id(newrevtree.inventory.root.revision),
+                          svn_revprops[properties.PROP_REVISION_DATE], 
+                          svn_revprops.get(properties.PROP_REVISION_AUTHOR, 
""))
+            update_settings(wc, "")
+        finally:
+            wc.close()
 
         self.set_parent_ids([new_revid])
 


-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to