unbreak push to sftp...
John A Meinel
john at arbash-meinel.com
Tue Feb 21 22:47:05 GMT 2006
Robert Collins wrote:
> 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
>
Susan
Though I would still like to see push tested through sftp://
Also, does this change the fact that push can update local working
trees? I know I added that a long time ago. The original push never
updated the working tree, I added code so that if it could, it would try to.
I think it is important to keep that for current branch formats. Future
ones, where the working tree is decoupled don't have to ever update.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060221/d72aebd0/attachment.pgp
More information about the bazaar
mailing list