[BUG] sftp push usage

John A Meinel john at arbash-meinel.com
Thu Jun 1 10:50:50 BST 2006


Martin Pool wrote:
> On 26 May 2006, Robert Collins <robertc at robertcollins.net> wrote:
>> On Thu, 2006-05-25 at 09:50 -0500, John Arbash Meinel wrote:
>>> Alexander Belchenko wrote:
>>>> I think it's a bug.
>>>>
>>>> Today I'm testing how paramiko works on win32.
>>>> I try to push paramiko's own branch to linux machine.
>>>> I specify wrong path but bzr behaviour is buggy.
>>> Well, there are 2 bugs here, but I can confirm both of them.
>>>
>>> 1: using 'bzr push sftp://localhost/test' tries to create 'test' rather
>>> than '/test'. because it is able to split the url down to
>>> 'sftp://localhost' which it thinks is a directory.
>>> My encodings branch had a lot of work to switch the url handling, which
>>> may fix this bug.
>>>
>>> 2: LockableFiles doesn't create _lock_count early enough. So a failure
>>> during creation causes the bogus error. I could have sworn I've
>>> committed a fix for this (maybe also in my encodings branch).
>>> The issue is that _find_modes() can raise an exception, and the
>>> deconstructor expects _lock_count to exist.
>>> Putting 'self._lock_count = 0' before 'self._find_modes' in
>>> LockableFiles.__init__ should fix this.
>>> Alternatively, we could add '_lock_count = 0' to the Class declaration,
>>> though my understanding is we were avoiding class declared variables.
> 
> If people approve I'll commit this patch to tidy it up while we mention
> it.

+1 from me. Even better if you write a test case which makes
lockable_files fail, and check that it doesn't output "ignoring
exception in __del__ function."

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


More information about the bazaar mailing list