Merge lp:~vila/bzr/786980-url-aliases into lp:bzr/2.3
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | no longer in the source branch. |
Merged at revision: | 5655 |
Proposed branch: | lp:~vila/bzr/786980-url-aliases |
Merge into: | lp:bzr/2.3 |
Diff against target: |
64 lines (+34/-1) 3 files modified
bzrlib/branch.py (+10/-1) bzrlib/tests/test_remote.py (+20/-0) doc/en/release-notes/bzr-2.3.txt (+4/-0) |
To merge this branch: | bzr merge lp:~vila/bzr/786980-url-aliases |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Needs Information | ||
Jonathan Riddell (community) | Needs Fixing | ||
Review via email: mp+67351@code.launchpad.net |
Commit message
Relax the URL comparison a bit when checking the master branch URL.
Description of the change
My understanding of the issue here is that we end up raising:
ReadOnlyError: A write attempt was made in read only transaction
because, during a 'bzr update', we compare the source.user.url
(i.e. a '.base' transport attribute) to ``bound_location`` which
comes from a config file.
Between 2.3.1 and 2.3.3 a fix trigger this comparison and, as I
understand it, revealed bad urls in the config files. These urls
themselves have probably been created long before 2.3.1 itself as
inspecting te diff 2.3.1/2.3.3 gives absolutely no clue. This
theory seem to be confirmed by bug reporters being unable to
reproduce the issue when re-creating the checkout from scratch
with 2.3.3.
So I added a test based on this scenario and was able to
reproduce.
From there, I tried various approaches and ended up with a
conservative fix which avoid accessing the master branch itself
(some tests fail otherwise). This means that the fix still relies
on url comparison.
At this point I realize that we may want to more checks and issue
an error if the URL is really broken (because the config file was
edited by hand for example), but that's out of scope for 2.3
"# bond_location" typo
Suggestions to make the test more foolproof, add instances other than trailing slashes in URL such as including + or ~ characters. Add changes to the branch before the update.
the release note doesn't describe the bug very well, it should mention that it fixes the readonlyerror
"fron" typo