[plugin] binary sys.stdout/err on win32

John Arbash Meinel john at arbash-meinel.com
Mon Jun 19 15:53:54 BST 2006


Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> Yeah, I had been thinking about it. And I think just having a separate
>>> function that can be called, like 'self.ensure_binary_output()'. Then
>>> 'bundle' could always call it, and 'diff' could call it if the
>>> '--strict' flag is sent. 
> 
> That sounds good to me.
> 
>>> I want --strict anyway, so that we can switch
>>> to utf-8 filenames, rather than local 'replace' style filenames.
> 
> This would also emit add/delete pairs for renames?

That would make sense to me.

> 
>>>> I think it's reasonable to support '-' for reading bundles from stdin.
> 
>>> Are you thinking of a new command, or are you thinking 'bzr merge -'.
> 
> Just bzr merge - / bzr pull -.  I think a tweak of your
> read_bundle_from_url is all that's needed.
> 
> Aaron

Yeah, it is actually pretty simple. Rather than getting a transport
object, we would just grab sys.stdin.

I'm thinking, though, that we should either take a transport object, or
return the one we grab, so that we don't end up double connecting when
somebody asks to merge against a remote location.

I'm thinking the best way would be to take a transport to the file, and
then clone('..') it. Because we want to be raising NotABundle, which
means we can't return anything.

It does mean that we would need to switch to
Branch.open_from_transport(), and maybe
Branch.open_containing_from_transport().

I don't really like it, but we need some way to avoid double connects.
Maybe it would be easier to create a new Branch/BzrDir type, which is
the BundleBranch. So that we then hook into the regular probing mechanism.

I would actually be much happier with something like that in the next
version. We already have the 'register_control_format' hook. I think
that should be part of Bundle v0.8

We would have to tweak it differently to handle 'get_transport('-')'.
Unfortunately, right now that would return a LocalTransport with path
'/local/path/-'

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060619/374c52ce/attachment.pgp 


More information about the bazaar mailing list