unbreak push to sftp...
Robert Collins
robertc at robertcollins.net
Tue Feb 21 22:10:52 GMT 2006
Some cruft I snuck in broke push to sftp:
=== modified file 'bzrlib/branch.py'
--- bzrlib/branch.py
+++ bzrlib/branch.py
@@ -98,18 +98,6 @@
# this is really an instance variable - FIXME move it there
# - RBC 20060112
base = None
-
- @staticmethod
- def create(base):
- """Construct the current default format branch in a_bzrdir.
-
- This creates the current default BzrDir format, and if that
- supports multiple Branch formats, then the default Branch
format
- will take effect.
- """
- print "not usable until we have repositories"
- raise NotImplementedError("not usable right now")
- return bzrdir.BzrDir.create(base)
def __init__(self, *ignored, **ignored_too):
raise NotImplementedError('The Branch class is abstract')
The create method here has never been functional, and
bzrdir.BzrDir.create_branch_convenience is much more useful IMNSHO so,
I'm nuking this.
=== modified file 'bzrlib/builtins.py'
--- bzrlib/builtins.py
+++ bzrlib/builtins.py
@@ -504,10 +504,7 @@
if new_transport.base == transport.base:
raise BzrCommandError("Could not creeate "
"path prefix.")
- if isinstance(transport, LocalTransport):
- br_to = WorkingTree.create_standalone(location).branch
- else:
- br_to = Branch.create(location)
+ br_to =
bzrlib.bzrdir.BzrDir.create_branch_convenience(location)
old_rh = br_to.revision_history()
try:
try:
This was an example of problematic layering - the replacement call here
is thoroughly unit tested, and if cmd_push had been using such wouldn't
have broken.
The reason the test cases haven't caught this is that push with a
non-local-fs is not tested currently - and IMO this is ok as long as
push does not have such type-based dispatch within it... its underlying
layers need the variety of testing.
Desperately seeking Susan^W+1
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060222/9ac315ab/attachment.pgp
More information about the bazaar
mailing list