Rev 2433: (robertc) Two minor misc-fixes. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Apr 20 08:40:27 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2433
revision-id: pqm at pqm.ubuntu.com-20070420074025-f3uyko3oai8bj5td
parent: pqm at pqm.ubuntu.com-20070419224637-jvlshh6kibtj43a5
parent: robertc at robertcollins.net-20070420070654-0spvh2id8kd2hlyb
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-04-20 08:40:25 +0100
message:
  (robertc) Two minor misc-fixes.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
  bzrlib/tests/test_transport_implementations.py test_transport_implementations.py-20051227111451-f97c5c7d5c49fce7
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
    ------------------------------------------------------------
    revno: 2400.2.3
    merged: robertc at robertcollins.net-20070420070654-0spvh2id8kd2hlyb
    parent: robertc at robertcollins.net-20070405084449-xmkv95pa4cgn0het
    parent: pqm at pqm.ubuntu.com-20070419224637-jvlshh6kibtj43a5
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: misc-fixen
    timestamp: Fri 2007-04-20 17:06:54 +1000
    message:
      Merge bzr.dev.
    ------------------------------------------------------------
    revno: 2400.2.2
    merged: robertc at robertcollins.net-20070405084449-xmkv95pa4cgn0het
    parent: robertc at robertcollins.net-20070405030706-9zpyygdfimm020u8
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: misc-fixen
    timestamp: Thu 2007-04-05 18:44:49 +1000
    message:
      Document BzrDir.open_workingtree's new recommend_upgrade parameter.
    ------------------------------------------------------------
    revno: 2400.2.1
    merged: robertc at robertcollins.net-20070405030706-9zpyygdfimm020u8
    parent: pqm at pqm.ubuntu.com-20070404213903-fe78a7a55c37ee95
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: misc-fixen
    timestamp: Thu 2007-04-05 13:07:06 +1000
    message:
      Split out the improvement to Transport.local_abspath to raise NotLocalURL from the hpss-faster-copy branch. (Martin Pool, Ian Clatworthy)
=== modified file 'NEWS'
--- a/NEWS	2007-04-19 20:05:32 +0000
+++ b/NEWS	2007-04-20 07:06:54 +0000
@@ -41,6 +41,9 @@
     * Convenience method TestCase.expectFailure ensures that known failures
       do not silently pass.  (Aaron Bentley)
 
+    * Transport.local_abspath now raises NotLocalUrl rather than 
+      TransportNotPossible. (Martin Pool, Ian Clatworthy)
+
     * New SmartServer hooks facility. There are two initial hooks documented
       in bzrlib.transport.smart.SmartServerHooks. The two initial hooks allow
       plugins to execute code upon server startup and shutdown.

=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2007-04-01 06:19:16 +0000
+++ b/bzrlib/bzrdir.py	2007-04-05 08:44:49 +0000
@@ -636,10 +636,14 @@
         """
         raise NotImplementedError(self.open_repository)
 
-    def open_workingtree(self, _unsupported=False):
+    def open_workingtree(self, _unsupported=False,
+            recommend_upgrade=True):
         """Open the workingtree object at this BzrDir if one is present.
-        
-        TODO: static convenience version of this?
+
+        :param recommend_upgrade: Optional keyword parameter, when True (the
+            default), emit through the ui module a recommendation that the user
+            upgrade the working tree when the workingtree being opened is old
+            (but still fully supported).
         """
         raise NotImplementedError(self.open_workingtree)
 

=== modified file 'bzrlib/tests/test_transport_implementations.py'
--- a/bzrlib/tests/test_transport_implementations.py	2007-04-16 02:44:04 +0000
+++ b/bzrlib/tests/test_transport_implementations.py	2007-04-20 07:06:54 +0000
@@ -31,10 +31,17 @@
     osutils,
     urlutils,
     )
-from bzrlib.errors import (DirectoryNotEmpty, NoSuchFile, FileExists,
-                           LockError, NoSmartServer, PathError,
-                           TransportNotPossible, ConnectionError,
-                           InvalidURL)
+from bzrlib.errors import (ConnectionError,
+                           DirectoryNotEmpty,
+                           FileExists,
+                           InvalidURL,
+                           LockError,
+                           NoSmartServer,
+                           NoSuchFile,
+                           NotLocalUrl,
+                           PathError,
+                           TransportNotPossible,
+                           )
 from bzrlib.osutils import getcwd
 from bzrlib.smart import medium
 from bzrlib.symbol_versioning import zero_eleven
@@ -1143,7 +1150,7 @@
         transport = self.get_transport()
         try:
             p = transport.local_abspath('.')
-        except TransportNotPossible:
+        except NotLocalUrl:
             pass # This is not a local transport
         else:
             self.assertEqual(getcwd(), p)

=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2007-04-16 08:02:54 +0000
+++ b/bzrlib/transport/__init__.py	2007-04-20 07:06:54 +0000
@@ -403,9 +403,7 @@
         This function will only be defined for Transports which have a
         physical local filesystem representation.
         """
-        # TODO: jam 20060426 Should this raise NotLocalUrl instead?
-        raise errors.TransportNotPossible('This is not a LocalTransport,'
-            ' so there is no local representation for a path')
+        raise errors.NotLocalUrl(self.abspath(relpath))
 
     def has(self, relpath):
         """Does the file relpath exist?




More information about the bazaar-commits mailing list