Rev 1236: Specify paths explicitly to do_update and do_switch. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4/

Jelmer Vernooij jelmer at samba.org
Tue Jun 17 22:03:11 BST 2008


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

------------------------------------------------------------
revno: 1236
revision-id: jelmer at samba.org-20080617210310-x1uzjw4hry0x252d
parent: jelmer at samba.org-20080617205523-hqus05shap15g9yc
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2008-06-17 23:03:10 +0200
message:
  Specify paths explicitly to do_update and do_switch.
modified:
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
  logwalker.py                   logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
  ra.py                          ra.py-20080615005305-t5221niknu8rm6bt-1
  transport.py                   transport.py-20060406231150-b3472d06b3a0818d
  tree.py                        tree.py-20060624222557-dudlwqcmkf22lt2s-1
=== modified file 'fetch.py'
--- a/fetch.py	2008-06-17 20:55:23 +0000
+++ b/fetch.py	2008-06-17 21:03:10 +0000
@@ -635,7 +635,7 @@
                                                        editor.branch_path)
 
                             conn = self.source.transport.connections.get(branch_url)
-                            reporter = conn.do_update(editor.revnum, True, 
+                            reporter = conn.do_update(editor.revnum, "", True, 
                                                            editor)
 
                             try:
@@ -650,11 +650,11 @@
                             conn = self.source.transport.connections.get(urlutils.join(repos_root, parent_branch))
 
                             if parent_branch != editor.branch_path:
-                                reporter = conn.do_switch(editor.revnum, True, 
+                                reporter = conn.do_switch(editor.revnum, "", True, 
                                     urlutils.join(repos_root, editor.branch_path), 
                                     editor)
                             else:
-                                reporter = conn.do_update(editor.revnum, True, editor)
+                                reporter = conn.do_update(editor.revnum, "", True, editor)
 
                             try:
                                 # Report status of existing paths

=== modified file 'logwalker.py'
--- a/logwalker.py	2008-06-17 20:55:23 +0000
+++ b/logwalker.py	2008-06-17 21:03:10 +0000
@@ -449,7 +449,7 @@
         editor = TreeLister(path)
         try:
             conn = self._transport.connections.get(urlutils.join(self._transport.get_svn_repos_root(), path))
-            reporter = conn.do_update(revnum, True, editor)
+            reporter = conn.do_update(revnum, "", True, editor)
             reporter.set_path("", revnum, True, None)
             reporter.finish()
         finally:

=== modified file 'ra.py'
--- a/ra.py	2008-06-17 20:55:23 +0000
+++ b/ra.py	2008-06-17 21:03:10 +0000
@@ -46,7 +46,7 @@
         self.recent_baton = []
         self._connection = connection
 
-    def open_root(self, base_revnum):
+    def open_root(self, base_revnum=-1):
         assert self.recent_baton == [], "root already opened"
         baton = svn.delta.editor_invoke_open_root(self.editor, 
                 self.editor_baton, base_revnum)
@@ -114,8 +114,6 @@
         return baton
 
 
-
-
 class Auth:
     def __init__(self, providers=[]):
         self.providers = providers
@@ -251,11 +249,11 @@
         self._edit_baton = edit_baton
         return self._edit, self._edit_baton
 
-    def do_switch(self, switch_rev, recurse, switch_url, editor):
+    def do_switch(self, switch_rev, path, recurse, switch_url, editor):
         self.mutter('svn switch -r %d -> %r', switch_rev, switch_url)
         self._mark_busy()
         edit, edit_baton = self._make_editor(editor)
-        return self.Reporter(self, svn.ra.do_switch(self._ra, switch_rev, "", 
+        return self.Reporter(self, svn.ra.do_switch(self._ra, switch_rev, path,
                              recurse, switch_url, edit, edit_baton, None))
 
     def change_rev_prop(self, revnum, name, value):
@@ -312,11 +310,11 @@
         svn.ra.replay(self._ra, revision, low_water_mark, send_deltas,
                       edit, edit_baton, None)
 
-    def do_update(self, revnum, recurse, editor):
+    def do_update(self, revnum, recurse, path, editor):
         self.mutter('svn update -r %r', revnum)
         self._mark_busy()
         edit, edit_baton = self._make_editor(editor)
-        return self.Reporter(self, svn.ra.do_update(self._ra, revnum, "", 
+        return self.Reporter(self, svn.ra.do_update(self._ra, revnum, path,
                              recurse, edit, edit_baton, None))
 
     def has_capability(self, cap):

=== modified file 'transport.py'
--- a/transport.py	2008-06-17 20:55:23 +0000
+++ b/transport.py	2008-06-17 21:03:10 +0000
@@ -182,10 +182,10 @@
         finally:
             self.add_connection(conn)
 
-    def do_switch(self, switch_rev, recurse, switch_url, editor):
+    def do_switch(self, switch_rev, path, recurse, switch_url, editor):
         conn = self._open_real_transport()
         conn.set_unbusy_handler(lambda: self.add_connection(conn))
-        return conn.do_switch(switch_rev, recurse, switch_url, editor)
+        return conn.do_switch(switch_rev, path, recurse, switch_url, editor)
 
     def iter_log(self, paths, from_revnum, to_revnum, limit, discover_changed_paths, 
                  strict_node_history, revprops):
@@ -326,10 +326,10 @@
         finally:
             self.add_connection(conn)
 
-    def do_update(self, revnum, recurse, editor):
+    def do_update(self, revnum, path, recurse, editor):
         conn = self._open_real_transport()
         conn.set_unbusy_handler(lambda: self.add_connection(conn))
-        return conn.do_update(revnum, recurse, editor)
+        return conn.do_update(revnum, path, recurse, editor)
 
     def has_capability(self, cap):
         conn = self.get_connection()

=== modified file 'tree.py'
--- a/tree.py	2008-06-17 20:55:23 +0000
+++ b/tree.py	2008-06-17 21:03:10 +0000
@@ -136,7 +136,7 @@
         self.file_data = {}
         root_repos = repository.transport.get_svn_repos_root()
         reporter = repository.transport.do_switch(
-                self.revnum, True, 
+                self.revnum, "", True, 
                 urlutils.join(root_repos, self.branch_path), editor)
         reporter.set_path("", 0, True, None)
         reporter.finish()




More information about the bazaar-commits mailing list