Error: Length of base must be equal or exceed the platform minimum url length
Bug #398199 reported by
Lucius
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned | ||
Breezy |
Triaged
|
Medium
|
Unassigned |
Bug Description
I updated Bazaar on Windows Server 2008 from 1.13-1 to 1.16.1. Client has been on 1.16.1 prior to server update. Since then, client returns:
bzr: ERROR: Server sent an unexpected error: ('error', 'Length of base must be equal or exceed the platform mi
nimum url length (which is 11)')
Falling back to 1.13-1 on server resolves this error.
Any idea, why this error is happening and how to correct it?
Thank you.
tags: | added: win32 |
Changed in bzr: | |
status: | Triaged → Confirmed |
tags: | added: check-for-breezy |
tags: |
added: hpss removed: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Medium |
To post a comment you must log in.
Lucius wrote:
> Public bug reported:
>
> I updated Bazaar on Windows Server 2008 from 1.13-1 to 1.16.1. Client
> has been on 1.16.1 prior to server update. Since then, client returns:
>
> bzr: ERROR: Server sent an unexpected error: ('error', 'Length of base must be equal or exceed the platform mi
> nimum url length (which is 11)')
>
> Falling back to 1.13-1 on server resolves this error.
>
> Any idea, why this error is happening and how to correct it?
Hmm. That error comes from bzrlib. urlutils. file_relpath, which I think is only relpath. So apparently there's a LocalTransport object
called by LocalTransport.
with a base URL shorter than “file:///C:/”, which is meant to be impossible on
Windows.
Unfortunately the error doesn't tell us what the problematic URL is. We should
improve the error so that it includes this info, i.e. apply this patch:
=== modified file 'bzrlib/ urlutils. py' FILEURL_ LENGTH: FILEURL_ LENGTH) FILEURL_ LENGTH) ) from_url( base) from_url( path) osutils. relpath( base, path))
--- bzrlib/urlutils.py 2009-04-24 05:08:51 +0000
+++ bzrlib/urlutils.py 2009-07-12 06:25:28 +0000
@@ -75,9 +75,9 @@
This assumes that both paths are already fully specified file:// URLs.
"""
if len(base) < MIN_ABS_
- raise ValueError('Length of base must be equal or'
+ raise ValueError('Length of base (%r) must equal or'
' exceed the platform minimum url length (which is %d)' %
- MIN_ABS_
+ (base, MIN_ABS_
base = local_path_
path = local_path_
return escape(
Perhaps the new server-jail code since 1.13 is somehow tripping over this?
Although I'd expect that to use a ChrootTransport...
In the meantime you could try adding -Dhpss to the client, which will cause the
client to log the smart server conversation to the .bzr.log (“bzr --version”
will tell you where that log file is kept). It would be helpful to see which
request is triggering this error.
Hmm, I think the definition of either urlutils. _win32_ local_path_ to_url or MIN_ABS_ FILEURL_ LENGTH is buggy: _win32_ local_path_ to_url( '/') will FILEURL_ LENGTH on
urlutils.
return “file:///”, which is clearly less than 11 (MIN_ABS_
Windows). That may be the root cause of this bug (and if so was there in 1.13
too, but purely by luck the offending code path wasn't being hit in 1.13).
Thanks for the bug report!