bzrlib.info._repo_relpath confused about urls vs paths
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Aaron Bentley |
Bug Description
Not sure if this qualifies as a bug since I cannot get it to misbehave, but this code seems to be passing urls to osutils functions expecting paths.
_repo_relpath is called with the "base" attributes of two transports. This attribute is an url according to the documentation and some experimenting. It passes this to the osutils function normalizepath which expects a filesystem path. The url it receives is interpreted as a path relative to the current working directory (turning 'file:/
While this code works it looks like it at least deserves a comment on *how* it works. There may even be a bug lurking here (I managed to confuse a function of my own based on this one by removing the cwd, and I am not entirely sure if this code deals with non-ascii paths correctly).
Changed in bzr: | |
assignee: | nobody → aaron-bentley |
importance: | Undecided → Low |
status: | Unconfirmed → Fix Committed |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marien Zwart wrote:
> Public bug reported:
>
> Not sure if this qualifies as a bug since I cannot get it to misbehave,
> but this code seems to be passing urls to osutils functions expecting
> paths.
I'm having trouble imagining how to make it misbehave, but it doesn't relative_ url, we should
set a good example. Now that we have urlutils.
use that instead.
Aaron enigmail. mozdev. org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://
iD8DBQFFhqQe0F+ nu1YWqI0RAqojAJ sEMdunzEK9bRg7j HzyT5MncHeeuwCd F59v VC5aEQ54=
G0y8hK9NCTtEdor
=Bsrb
-----END PGP SIGNATURE-----