[PATCH] Re: any more sftp fixes?

John A Meinel john at arbash-meinel.com
Thu Dec 1 00:05:41 GMT 2005


John A Meinel wrote:
> Matthieu Moy wrote:
>> John A Meinel <john at arbash-meinel.com> writes:
>>
>>> The changes are available here:
>>> http://bzr.arbash-meinel.com/branches/bzr/sftp-fix/
>> Still doesn't work for me.
> 
> Thanks for the bug report.
> Maybe I missed it the first time around, but what is your specific use
> case which is failing?
> I want to make sure we get it added as a test case, so that we can make
> sure not to have the problem in the future.
> 
>> First, the error message for non-relative path is unclear, because the
>> error can come from a different port number, different host, or
>> different user.
>>
>> The following patch gives a more detailed error message.
> 
> I see your point in doing it that way. But one advantage of giving the
> complete paths is that if there is more than one of them which is
> incorrect, you can see them all at once. Rather than finding "username
> mismatch", fixing that, and then finding "host mismatch", etc.
> 
> What about having it be more:
> 
> 'path %r is not under base URL %r: %s' % (abspath, self.base, messages)
> 
> Where messages would then contain:
> 'username mismatch', 'port mismatch', 'host mismatch', 'path mismatch', etc.
> 
> Then you would get
> 
> bzr: ERROR: path sftp://someone@foo.com/path/to/stuff is not under base
> URL sftp://someoneelse@foo.com/path/to/stuff: username mismatch
> 
> Otherwise I think the thrown exception doesn't even make it clear that
> it is a non relative path error. Just that some username doesn't match.

By the way, I just implemented my fix, and I can see why you needed it.
Because otherwise the paths look like they should match, and the error
is very unhelpful (because there is no obvious port).


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/20051130/ecac8be2/attachment.pgp 


More information about the bazaar mailing list