Rev 1131: Fix commits. in http://people.samba.org/bzr/jelmer/bzr-svn/cext

Jelmer Vernooij jelmer at samba.org
Mon Aug 25 03:57:15 BST 2008


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

------------------------------------------------------------
revno: 1131
revision-id: jelmer at samba.org-20080825025712-6er2xgmcz23vizws
parent: jelmer at samba.org-20080825021719-i6cdln5mhpdnq2k8
parent: jelmer at samba.org-20080825025110-8e7fjv0oaemvc539
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Mon 2008-08-25 04:57:12 +0200
message:
  Fix commits.
modified:
  wc.c                           wc.pyx-20080313142018-10l8l23vha2j9e6b-1
  workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
    ------------------------------------------------------------
    revno: 950.24.227
    revision-id: jelmer at samba.org-20080825025110-8e7fjv0oaemvc539
    parent: jelmer at samba.org-20080825021247-95tfdxg6bw2ikuf5
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-08-25 04:51:10 +0200
    message:
      Fix.
    modified:
      wc.c                           wc.pyx-20080313142018-10l8l23vha2j9e6b-1
=== modified file 'wc.c'
--- a/wc.c	2008-08-25 01:58:11 +0000
+++ b/wc.c	2008-08-25 02:57:12 +0000
@@ -162,6 +162,9 @@
 	{ "kind", T_INT, offsetof(EntryObject, entry.kind), READONLY, NULL },
 	{ "revision", T_LONG, offsetof(EntryObject, entry.revision), READONLY, NULL },
 	{ "cmt_rev", T_LONG, offsetof(EntryObject, entry.cmt_rev), READONLY, NULL },
+	{ "checksum", T_STRING, offsetof(EntryObject, entry.checksum), READONLY, NULL },
+	{ "cmt_date", T_LONG, offsetof(EntryObject, entry.cmt_date), READONLY, NULL },
+	{ "cmt_author", T_STRING, offsetof(EntryObject, entry.cmt_author), READONLY, NULL },
 	{ NULL, }
 };
 

=== modified file 'workingtree.py'
--- a/workingtree.py	2008-08-25 02:17:19 +0000
+++ b/workingtree.py	2008-08-25 02:57:12 +0000
@@ -391,6 +391,7 @@
         # TODO: Implement more efficient version
         newrev = self.branch.repository.get_revision(revid)
         newrevtree = self.branch.repository.revision_tree(revid)
+        svn_revprops = self.branch.repository._log.revprop_list(rev)
 
         def update_settings(wc, path):
             id = newrevtree.inventory.path2id(path)
@@ -398,27 +399,33 @@
             revnum = self.branch.lookup_revision_id(
                     newrevtree.inventory[id].revision)
 
-            wc.process_committed(self.abspath(path).rstrip("/"), 
-                          False, revnum, 
-                          properties.time_to_cstring(newrev.timestamp), 
-                          newrev.committer)
-
             if newrevtree.inventory[id].kind != 'directory':
                 return
 
             entries = wc.entries_read(True)
-            for entry in entries:
-                if entry == "":
-                    continue
-
-                subwc = WorkingCopy(wc, os.path.join(self.basedir, path, entry), 
-                                   write_lock=True)
-                try:
-                    update_settings(subwc, os.path.join(path, entry))
-                finally:
-                    subwc.close()
+            for name, entry in entries.items():
+                if name == "" and path != "":
+                    continue
+
+                wc.process_committed(self.abspath(path).rstrip("/"), 
+                              False, rev, 
+                              svn_revprops[properties.PROP_REVISION_DATE], 
+                              svn_revprops[properties.PROP_REVISION_AUTHOR])
+
+                if name == "":
+                    continue
+
+                child_path = os.path.join(path, name)
+
+                if newrevtree.inventory[newrevtree.inventory.path2id(child_path)].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
+        import pdb; pdb.set_trace()
         wc = self._get_wc(write_lock=True)
         try:
             update_settings(wc, "")




More information about the bazaar-commits mailing list