[PATCHES] New patches for bzr.dev
John Arbash Meinel
john at arbash-meinel.com
Thu Dec 8 13:42:27 GMT 2005
Martin Pool wrote:
> On 24 Nov 2005, Alexander Belchenko <bialix at ukr.net> wrote:
>> * Patch #25. [Win32-specific] Default value for nick use '/' on
>> Windows. Changed to os.sep. Probably it's arguable solution, but at this
>> stage of development most of the code works well with os.sep internally
>> rather than '/'-only. (modified: bzrlib/branch.py)
>
>> === modified file 'bzrlib/branch.py'
>> --- bzrlib/branch.py
>> +++ bzrlib/branch.py
>> @@ -156,7 +156,7 @@
>>
>> def _get_nick(self):
>> cfg = self.tree_config()
>> - return cfg.get_option(u"nickname", default=self.base.split('/')[-1])
>> + return cfg.get_option(u"nickname", default=self.base.split(os.sep)[-1])
>>
>> def _set_nick(self, nick):
>> cfg = self.tree_config()
>
> I wonder if this should split on either / or \ to allow getting the
> nickname for a remote branch?
>
I probably haven't seen this one yet. I would do split('\\/')
In general, my win32 branch has changed all internal paths to only using
forward slash as a delimiter. (As soon as a path goes through any of the
abspath/relpath/pathjoin functions)
It is probably more heavy handed than truly necessary, but I think it
gets the job done.
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/20051208/34d614f6/attachment.pgp
More information about the bazaar
mailing list