Rev 1102: Merge 0.4. in http://people.samba.org/bzr/jelmer/bzr-svn/cext

Jelmer Vernooij jelmer at samba.org
Tue Jun 17 21:27:34 BST 2008


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

------------------------------------------------------------
revno: 1102
revision-id: jelmer at samba.org-20080617202733-h0mg8e7inpegxq1i
parent: jelmer at samba.org-20080615025400-69bnhlwikp5x62uy
parent: jelmer at samba.org-20080617202354-kjwsfvx2j486yrep
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Tue 2008-06-17 22:27:33 +0200
message:
  Merge 0.4.
modified:
  FAQ                            faq-20070910195147-p9u38s9wplds2d4o-1
  tests/test_workingtree.py      test_workingtree.py-20060622191524-0di7bc3q1ckdbybb-1
  transport.py                   transport.py-20060406231150-b3472d06b3a0818d
  workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
    ------------------------------------------------------------
    revno: 950.3.174
    revision-id: jelmer at samba.org-20080617202354-kjwsfvx2j486yrep
    parent: jelmer at samba.org-20080617195350-opqh4swky27h0ky7
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-06-17 22:23:54 +0200
    message:
      Add some extra targets to makefile to ease debugging.
    modified:
      Makefile                       makefile.other-20080311181537-5svhje3v1flh1n4f-1
    ------------------------------------------------------------
    revno: 950.3.173
    revision-id: jelmer at samba.org-20080617195350-opqh4swky27h0ky7
    parent: jelmer at samba.org-20080616172701-z1mb62so2euf64rp
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-06-17 21:53:50 +0200
    message:
      Support get_parent_ids() rather than pending_merges(), which has been removed.
    modified:
      ra.py                          ra.py-20080615005305-t5221niknu8rm6bt-1
      tests/test_workingtree.py      test_workingtree.py-20060622191524-0di7bc3q1ckdbybb-1
      workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
    ------------------------------------------------------------
    revno: 950.3.172
    revision-id: jelmer at samba.org-20080616172701-z1mb62so2euf64rp
    parent: jelmer at samba.org-20080616170417-e1cxsfte1g1os84c
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-06-16 19:27:01 +0200
    message:
      Fix imports.
    modified:
      ra.py                          ra.py-20080615005305-t5221niknu8rm6bt-1
      workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
    ------------------------------------------------------------
    revno: 950.3.171
    revision-id: jelmer at samba.org-20080616170417-e1cxsfte1g1os84c
    parent: jelmer at samba.org-20080616165902-67sd4k56ppvyfslc
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-06-16 19:04:17 +0200
    message:
      Remove more dependencies on the standard python bindings.
    modified:
      branch.py                      svnbranch.py-20051017135706-11c749eb0dab04a7
      core.py                        core.py-20080615010310-67lnibnp889hlarb-1
      ra.py                          ra.py-20080615005305-t5221niknu8rm6bt-1
      transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 950.3.170
    revision-id: jelmer at samba.org-20080616165902-67sd4k56ppvyfslc
    parent: jelmer at samba.org-20080615024851-i8b6fip3rgh4hs1j
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-06-16 18:59:02 +0200
    message:
      Clarify FAQ entry.
    modified:
      FAQ                            faq-20070910195147-p9u38s9wplds2d4o-1
=== modified file 'FAQ'
--- a/FAQ	2008-06-02 22:11:08 +0000
+++ b/FAQ	2008-06-17 20:27:33 +0000
@@ -105,7 +105,7 @@
  All changes applied successfully.
  Pushed up to revision 1075.
 
-If you would like to forbid Bazaar from ever doing these operations, set the 
+If you would like to forbid Bazaar from ever doing these replace operations, set the 
 ``append-revisions-only`` setting to True for the repository you're 
 pushing to.
 

=== modified file 'tests/test_workingtree.py'
--- a/tests/test_workingtree.py	2008-06-15 02:54:00 +0000
+++ b/tests/test_workingtree.py	2008-06-17 20:27:33 +0000
@@ -17,6 +17,7 @@
 
 """Working tree tests."""
 
+from bzrlib.branch import Branch
 from bzrlib.bzrdir import BzrDir
 from bzrlib.errors import NoSuchFile, OutOfDateTree
 from bzrlib.inventory import Inventory
@@ -329,18 +330,12 @@
         self.assertFalse(inv.has_filename("bl"))
         self.assertFalse(basis_inv.has_filename("dir/bl"))
 
-    def test_pending_merges_empty(self):
-        self.make_client('a', 'dc')
-        self.build_tree({"dc/bl": "data"})
-        tree = self.open_checkout("dc")
-        self.assertEqual([], tree.pending_merges())
-
-    def test_get_parent_ids(self):
-        self.make_client('a', 'dc')
-        self.build_tree({"dc/bl": "data"})
-        tree = self.open_checkout("dc")
-        self.assertEqual([Branch.open('a').last_revision()], tree.get_parent_ids()) 
-
+    def test_get_parent_ids_no_merges(self):
+        repos_url = self.make_client('a', 'dc')
+        self.build_tree({"dc/bl": "data"})
+        tree = self.open_checkout("dc")
+        self.assertEqual([Branch.open(repos_url).last_revision()], tree.get_parent_ids())
+ 
     def test_delta(self):
         self.make_client('a', 'dc')
         self.build_tree({"dc/bl": "data"})
@@ -447,15 +442,17 @@
         self.assertEqual('symlink', inv[inv.path2id("bla")].kind)
         self.assertEqual("target", inv[inv.path2id("bla")].symlink_target)
 
-    def test_pending_merges(self):
-        self.make_client('a', 'dc')
+    def test_get_parent_ids(self):
+        repos_url = self.make_client('a', 'dc')
         self.build_tree({"dc/bl": None})
 
+        lhs_parent_id = Branch.open(repos_url).last_revision()
+
         tree = self.open_checkout("dc")
         tree.set_pending_merges(["a", "c"])
-        self.assertEqual(["a", "c"], tree.pending_merges())
+        self.assertEqual([lhs_parent_id, "a", "c"], tree.get_parent_ids())
         tree.set_pending_merges([])
-        self.assertEqual([], tree.pending_merges())
+        self.assertEqual([lhs_parent_id], tree.get_parent_ids())
 
     def test_set_pending_merges_prop(self):
         self.make_client('a', 'dc')

=== modified file 'transport.py'
--- a/transport.py	2008-06-15 02:20:20 +0000
+++ b/transport.py	2008-06-17 20:27:33 +0000
@@ -24,18 +24,19 @@
 from bzrlib.plugins.svn import core, properties, ra
 from bzrlib.plugins.svn import properties
 from bzrlib.plugins.svn.auth import create_auth_baton
-from bzrlib.plugins.svn.core import SubversionException
+from bzrlib.plugins.svn.core import SubversionException, get_config
 from bzrlib.plugins.svn.errors import convert_svn_error, NoSvnRepositoryPresent, ERR_BAD_URL, ERR_RA_SVN_REPOS_NOT_FOUND, ERR_FS_ALREADY_EXISTS, ERR_FS_NOT_FOUND, ERR_FS_NOT_DIRECTORY
-from bzrlib.plugins.svn.ra import DIRENT_KIND
+from bzrlib.plugins.svn.ra import DIRENT_KIND, RemoteAccess
 import urlparse
 import urllib
 
-svn_config = core.get_config()
+svn_config = get_config()
 
 def get_client_string():
     """Return a string that can be send as part of the User Agent string."""
     return "bzr%s+bzr-svn%s" % (bzrlib.__version__, bzrlib.plugins.svn.__version__)
 
+ 
 # Don't run any tests on SvnTransport as it is not intended to be 
 # a full implementation of Transport
 def get_test_permutations():
@@ -76,21 +77,6 @@
     return url
 
 
-def needs_busy(unbound):
-    """Decorator that marks a connection as busy before running a methd on it.
-    """
-    def convert(self, *args, **kwargs):
-        self._mark_busy()
-        try:
-            return unbound(self, *args, **kwargs)
-        finally:
-            self._unmark_busy()
-
-    convert.__doc__ = unbound.__doc__
-    convert.__name__ = unbound.__name__
-    return convert
-
-
 def Connection(url):
     try:
         mutter('opening SVN RA connection to %r' % url)
@@ -124,14 +110,14 @@
                 return c
         # Nothing available? Just pick an existing one and reparent:
         if len(self.connections) == 0:
-            return Connection(url)
+            return RemoteAccess(url)
         c = self.connections.pop()
         try:
             c.reparent(url)
             return c
         except NotImplementedError:
             self.connections.add(c)
-            return Connection(url)
+            return RemoteAccess(url)
         except:
             self.connections.add(c)
             raise

=== modified file 'workingtree.py'
--- a/workingtree.py	2008-06-15 02:54:00 +0000
+++ b/workingtree.py	2008-06-17 20:27:33 +0000
@@ -41,10 +41,12 @@
 from bzrlib.plugins.svn.mapping import (SVN_PROP_BZR_ANCESTRY, SVN_PROP_BZR_FILEIDS, 
                      SVN_PROP_BZR_REVISION_ID, SVN_PROP_BZR_REVISION_INFO,
                      escape_svn_path, generate_revision_metadata)
+from bzrlib.plugins.svn.ra import create_svn_client
 from bzrlib.plugins.svn.remote import SvnRemoteAccess
 from bzrlib.plugins.svn.repository import SvnRepository
 from bzrlib.plugins.svn.svk import SVN_PROP_SVK_MERGE, parse_svk_features, serialize_svk_features
-from bzrlib.plugins.svn.transport import (SvnRaTransport, bzr_to_svn_url, svn_config) 
+from bzrlib.plugins.svn.transport import (SvnRaTransport, bzr_to_svn_url, 
+                       svn_config) 
 from bzrlib.plugins.svn.tree import SvnBasisTree
 
 import os




More information about the bazaar-commits mailing list