[MERGE] branch.has_explicit_nick
Aaron Bentley
aaron.bentley at utoronto.ca
Fri Jun 30 14:20:49 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> On Fri, 2006-06-30 at 16:50 +1000, Robert Collins wrote:
>
>>I think its useful to discriminate between explicit and implicit nick
>>setting:
My initial reaction is that I want my explicit nicks to behave the same
as my implicit nicks. Could you say more?
The recent puts BranchConfig in charge of policy for determining config
options. For example, BranchConfig knows that it should try to read
.bzr/branch/email to determine the per-branch email address. And it
also knows that 'post_commit' should never be determined from a TreeConfig.
So if an option like this makes sense, I'd prefer to do:
=== modified file 'bzrlib/config.py'
- --- bzrlib/config.py 2006-06-21 21:35:06 +0000
+++ bzrlib/config.py 2006-06-30 13:07:28 +0000
@@ -512,11 +512,17 @@
return self._get_safe_value('_post_commit')
def _get_nickname(self):
- - value = self._get_best_value('_get_nickname')
+ value = self._get_explicit_nickname()
if value is not None:
return value
return self.branch.base.split('/')[-2]
+ def has_explicit_nickname(self):
+ return bool(self._get_explicit_nickname() is not None)
+
+ def _get_explicit_nickname():
+ return self._get_best_value('_get_nickname')
+
def _log_format(self):
"""See Config.log_format."""
return self._get_best_value('_log_format')
By the way, I received these messages out of sequence, and more than an
hour apart. They both arrived at lifelesswks.robertcollins.net at
21:30:20 +1000, but went askew after that.
Aaron
Received: from localhost (localhost [127.0.0.1])
by vm1.unixshell.com (Postfix) with ESMTP id 0887CA8505
for <abentley at localhost>; Fri, 30 Jun 2006 07:35:51 -0400 (EDT)
Received: from mailbox81.utcc.utoronto.ca [128.100.132.62]
by localhost with IMAP (fetchmail-6.2.5)
for abentley at localhost (single-drop); Fri, 30 Jun 2006 07:35:51 -0400 (EDT)
Received: via tmail-2002(14) for bentleya; Fri, 30 Jun 2006 07:31:22
- -0400 (EDT)
Received: from bureau16.ns.utoronto.ca ([128.100.132.44]:31118 "EHLO
bureau16.ns.utoronto.ca") by bureau25.ns.utoronto.ca with ESMTP
id <S1203153AbWF3LbM>; Fri, 30 Jun 2006 07:31:12 -0400
Received: from bureau23.ns.utoronto.ca ([128.100.132.57]:19596 "EHLO
bureau23.ns.utoronto.ca") by bureau16.ns.utoronto.ca with ESMTP
id <S1164792AbWF3La7>; Fri, 30 Jun 2006 07:30:59 -0400
Received: from esperanza.ubuntu.com (esperanza.ubuntu.com [82.211.81.173])
by bureau23.ns.utoronto.ca (8.12.11.20060308/8.12.11) with ESMTP id
k5UBUvwE028498
for <aaron.bentley at utoronto.ca>; Fri, 30 Jun 2006 07:30:57 -0400
Received: from localhost ([127.0.0.1] helo=esperanza.ubuntu.com)
by esperanza.ubuntu.com with esmtp (Exim 4.52)
id 1FwHD5-0002TI-0t; Fri, 30 Jun 2006 12:30:55 +0100
Received: from virt-161-port-5-wol-ad4.wholesaledsl.net ([203.132.224.161]
helo=mail.wholesaledsl.net)
by esperanza.ubuntu.com with smtp (Exim 4.52) id 1FwHCx-0002SY-4g
for bazaar-ng at lists.canonical.com; Fri, 30 Jun 2006 12:30:50 +0100
Received: (qmail 15094 invoked from network); 30 Jun 2006 11:30:52 -0000
Received: from unknown (HELO lifelesswks.robertcollins.net) (220.240.4.76)
by -R with SMTP; 30 Jun 2006 11:30:52 -0000
Received: from [195.182.78.95] (helo=lifelesslap.robertcollins.net)
by lifelesswks.robertcollins.net with esmtpa (Exim 4.60)
(envelope-from <robertc at robertcollins.net>) id 1FwHCU-0000K0-JU
for bazaar-ng at lists.canonical.com; Fri, 30 Jun 2006 21:30:19 +1000
Received: from localhost ([127.0.0.1] helo=localhost.localdomain)
by lifelesslap.robertcollins.net with esmtp (Exim 4.60)
(envelope-from <robertc at robertcollins.net>) id 1FwESm-0000A9-9G
for bazaar-ng at lists.canonical.com; Fri, 30 Jun 2006 18:34:56 +1000
From: Robert Collins <robertc at robertcollins.net>
To: "bazaar-ng at lists.canonical.com" <bazaar-ng at lists.canonical.com>
In-Reply-To: <1151650236.22031.85.camel at localhost.localdomain>
References: <1151650236.22031.85.camel at localhost.localdomain>
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=-wcHxxktdez5+1GOlM/mm"
Date: Fri, 30 Jun 2006 18:34:55 +1000
Message-Id: <1151656495.22031.89.camel at localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.1
Subject: Re: [MERGE] branch.has_explicit_nick
Received: from localhost (localhost [127.0.0.1])
by vm1.unixshell.com (Postfix) with ESMTP id 2975CA84CE
for <abentley at localhost>; Fri, 30 Jun 2006 08:51:03 -0400 (EDT)
Received: from mailbox81.utcc.utoronto.ca [128.100.132.62]
by localhost with IMAP (fetchmail-6.2.5)
for abentley at localhost (single-drop); Fri, 30 Jun 2006 08:51:03 -0400 (EDT)
Received: via tmail-2002(14) for bentleya; Fri, 30 Jun 2006 08:48:17
- -0400 (EDT)
Received: from bureau15.ns.utoronto.ca ([128.100.132.43]:33502 "EHLO
bureau15.ns.utoronto.ca") by bureau25.ns.utoronto.ca with ESMTP
id <S1331299AbWF3MsF>; Fri, 30 Jun 2006 08:48:05 -0400
Received: from bureau21.ns.utoronto.ca ([128.100.132.55]:33483 "EHLO
bureau21.ns.utoronto.ca") by bureau15.ns.utoronto.ca with ESMTP
id <S1082316AbWF3Mrr>; Fri, 30 Jun 2006 08:47:47 -0400
Received: from esperanza.ubuntu.com (esperanza.ubuntu.com [82.211.81.173])
by bureau21.ns.utoronto.ca (8.12.11.20060308/8.12.11) with ESMTP id
k5UCljqA000986
for <aaron.bentley at utoronto.ca>; Fri, 30 Jun 2006 08:47:45 -0400
Received: from localhost ([127.0.0.1] helo=esperanza.ubuntu.com)
by esperanza.ubuntu.com with esmtp (Exim 4.52)
id 1FwIPQ-0000V1-Os; Fri, 30 Jun 2006 13:47:44 +0100
Received: from virt-161-port-5-wol-ad4.wholesaledsl.net ([203.132.224.161]
helo=mail.wholesaledsl.net)
by esperanza.ubuntu.com with smtp (Exim 4.52) id 1FwIPP-0000Un-HA
for bazaar-ng at lists.canonical.com; Fri, 30 Jun 2006 13:47:44 +0100
Received: (qmail 18690 invoked from network); 30 Jun 2006 12:47:50 -0000
Received: from unknown (HELO lifelesswks.robertcollins.net) (220.240.4.76)
by -R with SMTP; 30 Jun 2006 12:47:50 -0000
Received: from [195.182.78.95] (helo=lifelesslap.robertcollins.net)
by lifelesswks.robertcollins.net with esmtpa (Exim 4.60)
(envelope-from <robertc at robertcollins.net>) id 1FwHCW-0000K0-6y
for bazaar-ng at lists.canonical.com; Fri, 30 Jun 2006 21:30:20 +1000
Received: from localhost ([127.0.0.1] helo=localhost.localdomain)
by lifelesslap.robertcollins.net with esmtp (Exim 4.60)
(envelope-from <robertc at robertcollins.net>) id 1FwCpp-0007uy-UT
for bazaar-ng at lists.canonical.com; Fri, 30 Jun 2006 16:50:38 +1000
From: Robert Collins <robertc at robertcollins.net>
To: "bazaar-ng at lists.canonical.com" <bazaar-ng at lists.canonical.com>
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=-9XMXGgFkfOkFneh3WZyO"
Date: Fri, 30 Jun 2006 16:50:36 +1000
Message-Id: <1151650236.22031.85.camel at localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.1
Subject: [MERGE] branch.has_explicit_nick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEpSUx0F+nu1YWqI0RArNcAJ4onHAYr39OQg6XkzNz+sY3hlAuLQCfX+Fy
B2Wdx1iFrNBUoruizWW2HVU=
=yT3q
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list