[RFC][MERGE] Show parent location in bzr info

James Blackwell jblack at merconline.com
Wed Mar 15 15:22:48 GMT 2006


> First time hacking on bzr, so please review :)

+1


> === modified file 'a/bzrlib/info.py'
> --- a/bzrlib/info.py
> +++ b/bzrlib/info.py
> @@ -166,3 +166,9 @@
>  #     print '  %8d inventories' % c
>  #     print '  %8d kB' % (t/1024)
> 
> +    loc = b.get_parent()
> +    if loc is not None:
> +        print
> +        print 'parent location:'
> +        print '  %s' % loc
> +
> 
> Test case is:
> 
> === modified file 'a/bzrlib/tests/blackbox/test_info.py'
> --- a/bzrlib/tests/blackbox/test_info.py
> +++ b/bzrlib/tests/blackbox/test_info.py
> @@ -238,3 +238,35 @@
>         ),
>              out)
>          self.assertEqual('', err)
> +
> +    def test_info_parent(self):
> +        b = self.make_branch('.')
> +        url = 'http://bazaar-vcs.org/bzr/bzr.dev/'
> +        b.set_parent(url)
> +        out,err = self.runbzr('info')
> +        self.assertEqualDiff(
> +"""branch format: Bazaar-NG branch, format 6
> +
> +in the working tree:
> +         0 unchanged
> +         0 modified
> +         0 added
> +         0 removed
> +         0 renamed
> +         0 unknown
> +         0 ignored
> +         0 versioned subdirectories
> +
> +branch history:
> +         0 revisions
> +         0 committers
> +
> +revision store:
> +         0 revisions
> +         0 kB
> +
> +parent location:
> +  http://bazaar-vcs.org/bzr/bzr.dev/
> +""", out)
> +        self.assertEqual('', err)
> +
> 
> Thats it.
> 
> Comments welcome,
>  -Olaf

-- 
My home page:   <a href="http://jblack.linuxguru.net">James Blackwell</a>
Gnupg 06357400  F-print AAE4 8C76 58DA 5902 761D  247A 8A55 DA73 0635 7400
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060315/4199e45b/attachment.pgp 


More information about the bazaar mailing list