[MERGE] print info after init and init-repo

Marius Kruger amanic at gmail.com
Thu Jul 17 05:35:01 BST 2008


>
>
> ------------------------------------------------------------------------
>     * Vincent Ladeuil <v.ladeuil+lp at free.fr <v.ladeuil%2Blp at free.fr>> *
>     * 16 July 2008 08:13 *
>
>     Marius> hi
>     Marius> I changed `bzr init` and `bzr init-repo` to print out
>     Marius> the same as `bzr info` if it completed successfully
>     Marius> (and if we're not in quiet mode)
>
>     Marius> I managed to get the tests to pass again (modelled after the
>     info and pull
>     Marius> tests),
>     Marius> but I'm concerned about:
>     Marius> 1) In <bzrlib/tests/commands/test_init.py> and
>     Marius> <bzrlib/tests/commands/test_init.py>
>     Marius>    I had to do the following:
>     Marius> -        self.assertEquals(1, len(self.connections))
>     Marius> +        self.assertEquals(2, len(self.connections))
>     Marius>    I'm not sure if this sort of thing is acceptable or how to
>     properly fix
>     Marius> it,
>
>     It is not. The purpose of the test is to check that a single
>     connection to the server is used, for performance reasons but
>     also because the user will be prompted for its password again
>     otherwise.
>

thanks for the explanation

...

>     Marius> +
>     show_bzrdir_info(bzrdir.BzrDir.open_containing(location)[0],
>     Marius> +                verbose=0, outfile=self.outf)
>
>     I think using open_containing_from_transport(to_transport)
>     instead of open_containing(location), will make the test pass
>     again.
>
>     Alternatively you can do open_containing(location,
>     possible_transports=[to_transport]).
>
>     By using 'location' you force bzrdir to create a new transport,
>     breaking the existing relation between location and to_transport,
>     defeating the connection sharing mechanism.
>

Thank you so much for the explanation and suggestions, I was really stuck.
I opted for your alternate solution, and it worked like a bomb!

I attached the diff since my previous patch, for your reviewing convenience.

regards
Marius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20080717/eb03a216/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_verbose2.patch
Type: text/x-patch
Size: 9691 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080717/eb03a216/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_verbose1..2.diff
Type: text/x-patch
Size: 1930 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080717/eb03a216/attachment-0001.bin 


More information about the bazaar mailing list