Rev 13: Workaround breakage with bazaar.launchpad.net. in http://bazaar.launchpad.net/~bzr/bzr-git/trunk

Robert Collins robertc at robertcollins.net
Tue May 1 10:17:28 BST 2007


At http://bazaar.launchpad.net/~bzr/bzr-git/trunk

------------------------------------------------------------
revno: 13
revision-id: robertc at robertcollins.net-20070501091701-1px3az8kerp38gor
parent: aaron.bentley at utoronto.ca-20061214080036-oxubsvzjkvzh2j4s
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Tue 2007-05-01 19:17:01 +1000
message:
  Workaround breakage with bazaar.launchpad.net.
modified:
  __init__.py                    __init__.py-20060715102359-vayyec84yioge4ok-1
=== modified file '__init__.py'
--- a/__init__.py	2006-12-14 08:00:36 +0000
+++ b/__init__.py	2007-05-01 09:17:01 +0000
@@ -107,7 +107,7 @@
 
     def open_repository(self, shared=False):
         """'open' a repository for this dir."""
-        return GitRepository(self._gitrepo, self, self._lockfiles)
+        return GitRepository(self, self._lockfiles)
 
     def open_workingtree(self):
         loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
@@ -130,9 +130,7 @@
         url = transport.base
         if url.startswith('readonly+'):
             url = url[len('readonly+'):]
-        if url.startswith('file://'):
-            url = url[len('file://'):]
-        url = url.encode('utf8')
+        path = urlutils.local_path_from_url(url)
         if not transport.has('.git'):
             raise errors.NotBranchError(path=transport.base)
         lockfiles = GitLockableFiles(GitLock())
@@ -142,10 +140,7 @@
     def probe_transport(klass, transport):
         """Our format is present if the transport ends in '.not/'."""
         # little ugly, but works
-        format = klass() 
-        # try a manual probe first, its a little faster perhaps ?
-        if transport.has('.git'):
-            return format
+        format = klass()
         # delegate to the main opening code. This pays a double rtt cost at the
         # moment, so perhaps we want probe_transport to return the opened thing
         # rather than an openener ? or we could return a curried thing with the



More information about the bazaar-commits mailing list