Merge lp:~jameinel/bzr/2.4-tree-root-dirstate-830947 into lp:bzr/2.4
Status: | Merged |
---|---|
Approved by: | John A Meinel |
Approved revision: | no longer in the source branch. |
Merged at revision: | 6075 |
Proposed branch: | lp:~jameinel/bzr/2.4-tree-root-dirstate-830947 |
Merge into: | lp:bzr/2.4 |
Diff against target: |
53 lines (+14/-7) 2 files modified
bzrlib/dirstate.py (+10/-7) doc/en/release-notes/bzr-2.4.txt (+4/-0) |
To merge this branch: | bzr merge lp:~jameinel/bzr/2.4-tree-root-dirstate-830947 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Wilbur | Approve | ||
Review via email: mp+164617@code.launchpad.net |
Commit message
Fix bug #830947. Dirstate.
The symptom is that if you have a tree with the file_id TREE_ROOT somewhere other than at '', it could cause 'bzr co' to fail because it tries to lookup the file in the id_index map, but it incorrectly points to a location ('') where the id never existed.
Description of the change
This fixes bug #830947.
Basically, there was a patch from Ian that I wasn't sure about, but we merged it. Turns out it introduced a bug. Specifically, when changing the root id of a newly created tree, it was forcing the old root id into the id_index map. However, that entry doesn't actually exist (because we are forcibly removing it.) So we don't want to add it.
update_minimal should be doing the right thing anyway.
This updates Dirstate._validate to validate the id_index more carefully.
I backported the patch the 2.4 because that is the first release that has the bug.
Thanks for the fix and for back-porting it to 2.4. Does this affect 2.5 and trunk?
Seems like this would be a great candidate for merging into all affected, maintained versions.
+1