[PATCH] Re: How to explore a remote branch?

John A Meinel john at arbash-meinel.com
Tue Feb 21 17:14:28 GMT 2006


Matthieu Moy wrote:
> Robert Collins <robertc at robertcollins.net> writes:
> 
>> This is actually incorrect, log only takes one parameter.
>>
>> If filename points to a file in a different branch, or to the root of a
>> different branch, then that branch is the one logged. 
> 
> Yes, but I found no way to give
> 
> "usage: bzr log [FILENAME|BRANCH_LOCATION]"
> 
> 
> Do the following sound better?
> 

Well, you have the problem that if somebody wrote "bzr log a b" it would
cause bzr to have an AttributeError exception, because it would try to
pass 'branch_location' to a function which doesn't accept it.

I think it would be better to *only* change the documentation to say:

class cmd_log(Command):
    """Show log of a branch.

    To request a range of logs, you can use the command -r begin..end
    -r revision requests a specific revision, -r ..end or -r begin.. are
    also valid.

    PATH can either be a filename or a branch location.
    If it is a filename, only logs for revisions which modified
    that file will be printed.
    """

    takes_args = ['path?']


Obviously this isn't a complete diff, but the idea would be to change
the argument from 'filename' to 'path' which is more generic, and make
the documentation indicate that PATH can be either a path to a file, or
to a branch.

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/b7a68e9b/attachment.pgp 


More information about the bazaar mailing list