Merge lp:~jameinel/bzr/2.0.1-322807-branch-at-root into lp:bzr/2.0
Proposed by
John A Meinel
Status: | Merged |
---|---|
Approved by: | Andrew Bennetts |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~jameinel/bzr/2.0.1-322807-branch-at-root |
Merge into: | lp:bzr/2.0 |
Diff against target: |
154 lines 3 files modified
NEWS (+20/-21) bzrlib/osutils.py (+9/-2) bzrlib/tests/test_osutils.py (+43/-0) |
To merge this branch: | bzr merge lp:~jameinel/bzr/2.0.1-322807-branch-at-root |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Bennetts | Needs Fixing | ||
Review via email: mp+12936@code.launchpad.net |
To post a comment you must log in.
This fixes bug #322807
Basically, cicp_canonical_ relpath always assumed that 'abspath()' returned a path that did not have a trailing '/'. However, when working at the root of the filesytem, this was not true. (And, I believe, not true on Linux or Mac, either.)
So I changed: len(abspath+ 1):] len(abspath) :].lstrip( '/')
return current[
to
return current[
which seems to work just fine.
In the process of doing this, I also made the function handle when base doesn't actually exist, since it made testing easier. And I changed it to always run tests that I'm sure will pass. (We don't require the filesystem to have CICP to run _cicp_canonical _relpath, only if we wanted to call it by 'osutils. canonical_ relpath( )'. This should help increase PQM test coverage.)