[MERGE][#299313] --local commits are accessing the network

John Arbash Meinel john at arbash-meinel.com
Tue Nov 25 20:47:45 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marius Kruger wrote:
> 2008/11/25 Jelmer Vernooij <jelmer at samba.org <mailto:jelmer at samba.org>>
> 
>     Jelmer Vernooij has voted tweak.
>     Status is now: Conditionally approved
>     Comment:
>     This should wait for 1.10 since it breaks the API. 
> 
>     _get_nick() should probably become public (in other words, be
>     renamed to get_nick).
> 
> 
> done.
> 
> new patch attached.
> 

I agree that this should be in 1.10 (considering we aren't going to do a
1.9.1 anyway). ic?

I believe we still need to add Per-branch tests that Branch.get_nick
works. I would put them in bzrlib/tests/per_branch/test_get_nick.py

If we are making it public then we should have:

1) A test that b.get_nick() returns the same value as b.nick

  b = self.make_branch('foo')
  self.assertEqual(b.nick, b.get_nick())

2) A test that setting the nick then returns the same thing from get_nick
  b = self.make_branch('test')
  b.nick = 'my test nick'
  self.assertEqual('my test nick', b.get_nick())

3) A test of the parameters to get_nick() that they are properly supported

  b.get_nick(local=False, possible_transports=None)

4) A test that the 'local' parameter has the effect we want:

  master = self.make_branch('master')
  slave = self.make_branch('slave')
  slave.bind(master)
  master.nick = 'my master nick'
  self.assertEqual('my master nick', slave.get_nick())
  self.assertEqual('slave', slave.get_nick(local=True))

5) We *probably* should have effort tests that if possible_transports is
supplied then we re-use the transport, rather than connecting again. I
believe Vincent has done work in that area. I'm not entirely sure how to
set all of that up.

BB:resubmit

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkksZHEACgkQJdeBCYSNAANFdACeIjQILQIYcTZfmngq7+OrNoZV
oEwAoMnpHYNUYT6v8q7rFSR3xSH/4Igh
=0OSw
-----END PGP SIGNATURE-----



More information about the bazaar mailing list