[BUG] sftp push usage

Robert Collins robertc at robertcollins.net
Thu May 25 23:24:15 BST 2006

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.

Yup, specifically we are avoiding using 
class Foo:

    instancevariable = value

because its confusing : even experienced python programmers sometimes
have to look twice to see what you have a class variable being treated
as a instance variable.

GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060526/edadb512/attachment.pgp 

More information about the bazaar mailing list