[PATCH] bzr --version prints branch nickname
John A Meinel
john at arbash-meinel.com
Wed Dec 28 19:57:29 GMT 2005
John A Meinel wrote:
> Aaron Bentley wrote:
>> John A Meinel wrote:
>> | ...I thought it might be nice if "bzr
>> | --version" prints the branch-nick, since we have them.
>>
>> What you're actually doing is printing the nick of the last-revision.
>> That may be what you want, but if you want the branch's current nick,
>> you can get it from Branch.nick.
>>
>> Aaron
>
> Yeah, I wasn't sure which one was better.
> If the tree was pristine, then I might actually prefer the
> last-revision. Because whatever I've named it, it hasn't actually been
> used for that yet.
>
> On the other hand, if it was unclean, it would be nice to know that. But
> I think a clean/unclean check is way too expensive for "bzr --version".
> (however it makes lots of sense for something like setup.py).
>
> I'll solicit feedback. Which do people think is best, branch.nick or
> last_revision.nick? (That's part of why I didn't integrate it yet).
>
> John
> =:->
>
Well, I never heard back from anyone about this. But I decided to pick
it up again. I decided to reformat it a little bit. So now it prints the
branch nickname, and reformats the output a little bit.
So now we have:
$ ./bzr --version
bzr (bazaar-ng) 0.7pre
bzr checkout, revision 1491
nick: bzr-jam-pending
revid: john at arbash-meinel.com-20051228194754-27fd0b38f0b9a7f2
Copyright 2005 Canonical Development Ltd.
http://bazaar-ng.org/
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
Since I worked on this, I'm actually looking into having setup.py
generate a snapshot of the version information, which I think will help
debug installed bzrlib. Also, I want this functionality for other
projects I have which are version controlled using bzr. I've done this
in the past for projects using baz/tla. Basically it is just a build
step which generates a version file.
These changes are available in my pending changes branch:
http://bzr.arbash-meinel.com/branches/bzr/jam-pending
The --version change is revno 1491.
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/20051228/1c287c5f/attachment.pgp
More information about the bazaar
mailing list