Rev 350: Add test file I forgot to add earlier, update TODO, some reformatting. in http://people.samba.org/bzr/jelmer/bzr-svn/bzr.dev

Jelmer Vernooij jelmer at samba.org
Mon Jan 1 15:42:40 GMT 2007


------------------------------------------------------------
revno: 350
revision-id: jelmer at samba.org-20070101154147-gihfok8g1dpayxcf
parent: jelmer at samba.org-20070101063020-65y03vowlr5tfik3
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: main
timestamp: Mon 2007-01-01 16:41:47 +0100
message:
  Add test file I forgot to add earlier, update TODO, some reformatting.
added:
  tests/test_checkout.py         test_checkout.py-20070101154110-eevkc29qj0q7udz5-1
modified:
  TODO                           todo-20060729211917-2kpobww0zyvvo0j2-1
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
=== added file 'tests/test_checkout.py'
--- a/tests/test_checkout.py	1970-01-01 00:00:00 +0000
+++ b/tests/test_checkout.py	2007-01-01 15:41:47 +0000
@@ -0,0 +1,40 @@
+# Copyright (C) 2006 Jelmer Vernooij <jelmer at samba.org>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+from bzrlib.bzrdir import BzrDir
+from bzrlib.errors import NoRepositoryPresent
+from bzrlib.tests import TestCase
+
+from format import SvnRemoteAccess
+from repository import SvnRepository
+from tests import TestCaseWithSubversionRepository
+
+class TestCheckout(TestCaseWithSubversionRepository):
+    def test_not_for_writing(self):
+        repos_url = self.make_client("d", "dc")
+        x = BzrDir.create_branch_convenience("dc/foo")
+        self.assertFalse(hasattr(x.repository, "uuid"))
+
+    def test_open_repository(self):
+        repos_url = self.make_client("d", "dc")
+        x = BzrDir.open("dc")
+        self.assertRaises(NoRepositoryPresent, x.open_repository)
+
+    def test_find_repository(self):
+        repos_url = self.make_client("d", "dc")
+        x = BzrDir.open("dc")
+        self.assertTrue(hasattr(x.find_repository(), "uuid"))
+

=== modified file 'TODO'
--- a/TODO	2007-01-01 05:43:44 +0000
+++ b/TODO	2007-01-01 15:41:47 +0000
@@ -1,6 +1,6 @@
-- don't generate revision history in branch until really necessary
-- custom implementation of last_revision() so that revision history doesn't
-  have to be generated?
+- allow remote locations in svn-import
+- fix "bzr status" in checkouts
+- faster "bzr status" in checkouts
 - avoid extra connect in logwalker?
 - get rid of use of `svn ls' in logwalker
 - more efficient implementation for applying txdeltas to weaves. perhaps convert svn deltas to bzr deltas?

=== modified file 'fetch.py'
--- a/fetch.py	2006-12-31 03:39:10 +0000
+++ b/fetch.py	2007-01-01 15:41:47 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2006 Jelmer Vernooij <jelmer at samba.org>
+# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer at samba.org>
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -174,7 +174,10 @@
 
     def change_file_prop(self, id, name, value, pool):
         if name == svn.core.SVN_PROP_EXECUTABLE: 
-            # Strange, you'd expect executable to match svn.core.SVN_PROP_EXECUTABLE_VALUE, but that's not how SVN behaves.
+            # You'd expect executable to match 
+            # svn.core.SVN_PROP_EXECUTABLE_VALUE, but that's not 
+            # how SVN behaves. It appears to consider the presence 
+            # of the property sufficient to mark it executable.
             self.is_executable = (value != None)
         elif (name == svn.core.SVN_PROP_SPECIAL):
             self.is_symlink = (value != None)
@@ -290,7 +293,8 @@
         needed = []
         parents = {}
         if revision_id is None:
-            for (branch, revnum) in self.source.follow_history(self.source._latest_revnum):
+            for (branch, revnum) in self.source.follow_history(
+                                                    self.source._latest_revnum):
                 revid = self.source.generate_revision_id(revnum, branch)
                 parents[revid] = self.source._mainline_revision_parent(branch, revnum)
 
@@ -300,7 +304,8 @@
             (path, until_revnum) = self.source.parse_revision_id(revision_id)
 
             prev_revid = None
-            for (branch, revnum) in self.source.follow_branch(path, until_revnum):
+            for (branch, revnum) in self.source.follow_branch(path, 
+                                                              until_revnum):
                 revid = self.source.generate_revision_id(revnum, branch)
 
                 if prev_revid is not None:




More information about the bazaar-commits mailing list