Rev 1560: Clearer error message. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk

Jelmer Vernooij jelmer at samba.org
Wed Aug 6 15:55:57 BST 2008


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

------------------------------------------------------------
revno: 1560
revision-id: jelmer at samba.org-20080806145556-htnm92jib073x834
parent: jelmer at samba.org-20080806144640-bn57kkwcgjwzojil
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2008-08-06 16:55:56 +0200
message:
  Clearer error message.
modified:
  workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'workingtree.py'
--- a/workingtree.py	2008-08-04 17:13:51 +0000
+++ b/workingtree.py	2008-08-06 14:55:56 +0000
@@ -21,7 +21,7 @@
 from bzrlib.bzrdir import BzrDirFormat, BzrDir
 from bzrlib.errors import (InvalidRevisionId, NotBranchError, NoSuchFile,
                            NoRepositoryPresent, BzrError, UninitializableFormat,
-                           OutOfDateTree)
+                           OutOfDateTree, NoWorkingTree)
 from bzrlib.inventory import Inventory, InventoryFile, InventoryLink
 from bzrlib.lockable_files import TransportLock, LockableFiles
 from bzrlib.lockdir import LockDir
@@ -38,7 +38,7 @@
 from bzrlib.plugins.svn.commit import _revision_id_to_svk_feature
 from bzrlib.plugins.svn.convert import SvnConverter
 from bzrlib.plugins.svn.core import SubversionException
-from bzrlib.plugins.svn.errors import LocalCommitsUnsupported, NoSvnRepositoryPresent, ERR_FS_TXN_OUT_OF_DATE, ERR_ENTRY_EXISTS, ERR_WC_PATH_NOT_FOUND, ERR_WC_NOT_DIRECTORY
+from bzrlib.plugins.svn.errors import LocalCommitsUnsupported, NoSvnRepositoryPresent, ERR_FS_TXN_OUT_OF_DATE, ERR_ENTRY_EXISTS, ERR_WC_PATH_NOT_FOUND, ERR_WC_NOT_DIRECTORY, NotSvnBranchPath
 from bzrlib.plugins.svn.format import get_rich_root_format
 from bzrlib.plugins.svn.mapping import (SVN_PROP_BZR_ANCESTRY, SVN_PROP_BZR_FILEIDS, 
                      SVN_PROP_BZR_REVISION_ID, SVN_PROP_BZR_REVISION_INFO,
@@ -810,7 +810,10 @@
         raise NotImplementedError(self.clone)
 
     def open_workingtree(self, _unsupported=False, recommend_upgrade=False):
-        return SvnWorkingTree(self, self.local_path, self.open_branch())
+        try:
+            return SvnWorkingTree(self, self.local_path, self.open_branch())
+        except NotSvnBranchPath, e:
+            raise NoWorkingTree(self.local_path)
 
     def sprout(self, url, revision_id=None, force_new_repo=False, 
                recurse='down', possible_transports=None, accelerator_tree=None,




More information about the bazaar-commits mailing list