Merge lp:~jameinel/bzr/2.6-merges-2.5 into lp:bzr

Proposed by John A Meinel
Status: Merged
Approved by: Martin Packman
Approved revision: no longer in the source branch.
Merged at revision: 6579
Proposed branch: lp:~jameinel/bzr/2.6-merges-2.5
Merge into: lp:bzr
Diff against target: 200 lines (+82/-19)
5 files modified
bzrlib/dirstate.py (+12/-3)
bzrlib/tests/blackbox/test_uncommit.py (+17/-0)
bzrlib/tests/per_workingtree/test_parents.py (+18/-3)
bzrlib/tests/test_dirstate.py (+14/-2)
doc/en/release-notes/bzr-2.4.txt (+21/-11)
To merge this branch: bzr merge lp:~jameinel/bzr/2.6-merges-2.5
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+171068@code.launchpad.net

Commit message

Merge bzr/2.5 into trunk, including the fix for bug #855155

Description of the change

Just merging 2.5 into trunk.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/dirstate.py'
--- bzrlib/dirstate.py 2013-05-23 10:04:17 +0000
+++ bzrlib/dirstate.py 2013-06-24 12:11:32 +0000
@@ -1648,9 +1648,18 @@
1648 entry_key = st(dirname, basename, file_id)1648 entry_key = st(dirname, basename, file_id)
1649 block_index, present = self._find_block_index_from_key(entry_key)1649 block_index, present = self._find_block_index_from_key(entry_key)
1650 if not present:1650 if not present:
1651 self._raise_invalid(new_path, file_id,1651 # The block where we want to put the file is not present.
1652 "Unable to find block for this record."1652 # However, it might have just been an empty directory. Look for
1653 " Was the parent added?")1653 # the parent in the basis-so-far before throwing an error.
1654 parent_dir, parent_base = osutils.split(dirname)
1655 parent_block_idx, parent_entry_idx, _, parent_present = \
1656 self._get_block_entry_index(parent_dir, parent_base, 1)
1657 if not parent_present:
1658 self._raise_invalid(new_path, file_id,
1659 "Unable to find block for this record."
1660 " Was the parent added?")
1661 self._ensure_block(parent_block_idx, parent_entry_idx, dirname)
1662
1654 block = self._dirblocks[block_index][1]1663 block = self._dirblocks[block_index][1]
1655 entry_index, present = self._find_entry_index(entry_key, block)1664 entry_index, present = self._find_entry_index(entry_key, block)
1656 if real_add:1665 if real_add:
16571666
=== modified file 'bzrlib/tests/blackbox/test_uncommit.py'
--- bzrlib/tests/blackbox/test_uncommit.py 2011-12-14 20:21:52 +0000
+++ bzrlib/tests/blackbox/test_uncommit.py 2013-06-24 12:11:32 +0000
@@ -314,3 +314,20 @@
314 self.assertLength(14, self.hpss_calls)314 self.assertLength(14, self.hpss_calls)
315 self.assertLength(1, self.hpss_connections)315 self.assertLength(1, self.hpss_connections)
316 self.assertThat(self.hpss_calls, ContainsNoVfsCalls)316 self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
317
318
319class TestInconsistentDelta(TestCaseWithTransport):
320 # See https://bugs.launchpad.net/bzr/+bug/855155
321 # See https://bugs.launchpad.net/bzr/+bug/1100385
322 # bzr uncommit may result in error
323 # 'An inconsistent delta was supplied involving'
324
325 def test_inconsistent_delta(self):
326 # Script taken from https://bugs.launchpad.net/bzr/+bug/855155/comments/26
327 wt = self.make_branch_and_tree('test')
328 self.build_tree(['test/a/', 'test/a/b', 'test/a/c'])
329 wt.add(['a', 'a/b', 'a/c'])
330 wt.commit('initial commit', rev_id='a1')
331 wt.remove(['a/b', 'a/c'])
332 wt.commit('remove b and c', rev_id='a2')
333 self.run_bzr("uncommit --force test")
317334
=== modified file 'bzrlib/tests/per_workingtree/test_parents.py'
--- bzrlib/tests/per_workingtree/test_parents.py 2012-09-19 07:58:27 +0000
+++ bzrlib/tests/per_workingtree/test_parents.py 2013-06-24 12:11:32 +0000
@@ -450,7 +450,7 @@
450 self.add_dir(new_shape, new_revid, 'root-id', None, '')450 self.add_dir(new_shape, new_revid, 'root-id', None, '')
451451
452 def assertTransitionFromBasisToShape(self, basis_shape, basis_revid,452 def assertTransitionFromBasisToShape(self, basis_shape, basis_revid,
453 new_shape, new_revid, extra_parent=None):453 new_shape, new_revid, extra_parent=None, set_current_inventory=True):
454 # set the inventory revision ids.454 # set the inventory revision ids.
455 basis_shape.revision_id = basis_revid455 basis_shape.revision_id = basis_revid
456 new_shape.revision_id = new_revid456 new_shape.revision_id = new_revid
@@ -465,8 +465,9 @@
465 parents.append(extra_parent)465 parents.append(extra_parent)
466 tree.set_parent_ids(parents)466 tree.set_parent_ids(parents)
467 self.fake_up_revision(tree, new_revid, new_shape)467 self.fake_up_revision(tree, new_revid, new_shape)
468 # give tree an inventory of new_shape468 if set_current_inventory:
469 tree._write_inventory(new_shape)469 # give tree an inventory of new_shape
470 tree._write_inventory(new_shape)
470 self.assertDeltaApplicationResultsInExpectedBasis(tree, new_revid,471 self.assertDeltaApplicationResultsInExpectedBasis(tree, new_revid,
471 delta, new_shape)472 delta, new_shape)
472 # The tree should be internally consistent; while this is a moderately473 # The tree should be internally consistent; while this is a moderately
@@ -764,3 +765,17 @@
764 self.add_link(new_shape, old_revid, 'link-id-C', 'dir-id-B', 'C', 'D')765 self.add_link(new_shape, old_revid, 'link-id-C', 'dir-id-B', 'C', 'D')
765 self.assertTransitionFromBasisToShape(basis_shape, old_revid,766 self.assertTransitionFromBasisToShape(basis_shape, old_revid,
766 new_shape, new_revid)767 new_shape, new_revid)
768
769 def test_add_files_to_empty_directory(self):
770 old_revid = 'old-parent'
771 basis_shape = Inventory(root_id=None)
772 self.add_dir(basis_shape, old_revid, 'root-id', None, '')
773 self.add_dir(basis_shape, old_revid, 'dir-id-A', 'root-id', 'A')
774 new_revid = 'new-parent'
775 new_shape = Inventory(root_id=None)
776 self.add_new_root(new_shape, old_revid, new_revid)
777 self.add_dir(new_shape, old_revid, 'dir-id-A', 'root-id', 'A')
778 self.add_file(new_shape, new_revid, 'file-id-B', 'dir-id-A', 'B',
779 '1' * 32, 24)
780 self.assertTransitionFromBasisToShape(basis_shape, old_revid,
781 new_shape, new_revid, set_current_inventory=False)
767782
=== modified file 'bzrlib/tests/test_dirstate.py'
--- bzrlib/tests/test_dirstate.py 2012-08-04 14:27:47 +0000
+++ bzrlib/tests/test_dirstate.py 2013-06-24 12:11:32 +0000
@@ -2478,7 +2478,12 @@
2478 def create_tree_from_shape(self, rev_id, shape):2478 def create_tree_from_shape(self, rev_id, shape):
2479 dir_ids = {'': 'root-id'}2479 dir_ids = {'': 'root-id'}
2480 inv = inventory.Inventory('root-id', rev_id)2480 inv = inventory.Inventory('root-id', rev_id)
2481 for path, file_id in shape:2481 for info in shape:
2482 if len(info) == 2:
2483 path, file_id = info
2484 ie_rev_id = rev_id
2485 else:
2486 path, file_id, ie_rev_id = info
2482 if path == '':2487 if path == '':
2483 # Replace the root entry2488 # Replace the root entry
2484 del inv._byid[inv.root.file_id]2489 del inv._byid[inv.root.file_id]
@@ -2486,7 +2491,7 @@
2486 inv._byid[file_id] = inv.root2491 inv._byid[file_id] = inv.root
2487 dir_ids[''] = file_id2492 dir_ids[''] = file_id
2488 continue2493 continue
2489 inv.add(self.path_to_ie(path, file_id, rev_id, dir_ids))2494 inv.add(self.path_to_ie(path, file_id, ie_rev_id, dir_ids))
2490 return revisiontree.InventoryRevisionTree(_Repo(), inv, rev_id)2495 return revisiontree.InventoryRevisionTree(_Repo(), inv, rev_id)
24912496
2492 def create_empty_dirstate(self):2497 def create_empty_dirstate(self):
@@ -2615,6 +2620,13 @@
2615 target=[('file', 'file-id')],2620 target=[('file', 'file-id')],
2616 )2621 )
26172622
2623 def test_add_file_in_empty_dir_not_matching_active_state(self):
2624 state = self.assertUpdate(
2625 active=[],
2626 basis=[('dir/', 'dir-id')],
2627 target=[('dir/', 'dir-id', 'basis'), ('dir/file', 'file-id')],
2628 )
2629
2618 def test_add_file_missing_in_active_state(self):2630 def test_add_file_missing_in_active_state(self):
2619 state = self.assertUpdate(2631 state = self.assertUpdate(
2620 active=[],2632 active=[],
26212633
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- doc/en/release-notes/bzr-2.4.txt 2013-05-23 10:04:17 +0000
+++ doc/en/release-notes/bzr-2.4.txt 2013-06-24 12:11:32 +0000
@@ -35,22 +35,20 @@
35* Cope with Unix filesystems, such as smbfs, where chmod gives 'permission35* Cope with Unix filesystems, such as smbfs, where chmod gives 'permission
36 denied'. (Martin Pool, #606537)36 denied'. (Martin Pool, #606537)
3737
38* Fix a traceback when trying to checkout a tree that also has an entry
39 with file-id `TREE_ROOT` somewhere other than at the root directory.
40 (John Arbash Meinel, #830947)
41
42* When the ``limbo`` or ``pending-deletion`` directories exist, typically
43 because of an interrupted tree update, but are empty, bzr no longer
44 errors out, because there is nothing for the user to clean up. Also,
45 errors in creation of these directories are no longer squelched.
46 (Martin Pool, #427773)
47
48* During merges, when two entries end up using the same path for two38* During merges, when two entries end up using the same path for two
49 different file-ids (the same file being 'bzr added' in two different39 different file-ids (the same file being 'bzr added' in two different
50 branches) , 'duplicate' conflicts are created instead of 'content'40 branches) , 'duplicate' conflicts are created instead of 'content'
51 ones. This was previously leading to a 'Malformed tramsform' exception.41 ones. This was previously leading to a 'Malformed tramsform' exception.
52 (Vincent Ladeuil, #880701)42 (Vincent Ladeuil, #880701)
5343
44* Fix a traceback when trying to checkout a tree that also has an entry
45 with file-id `TREE_ROOT` somewhere other than at the root directory.
46 (John Arbash Meinel, #830947)
47
48* Handle when an uncommit/update tries to add a file to an otherwise empty
49 directory. The ``Dirstate.update_basis_by_delta`` would end up
50 incorrectly flagging the delta as invalid. (Brian de Alwis, #855155)
51
54* 'Malformed transform' exceptions are now recognized as internal errors52* 'Malformed transform' exceptions are now recognized as internal errors
55 instead of user errors and report a traceback. This will reduce user53 instead of user errors and report a traceback. This will reduce user
56 confusion as there is generally nothing users can do about them.54 confusion as there is generally nothing users can do about them.
@@ -63,10 +61,22 @@
63 This shouldn't be treated as a fatal error.61 This shouldn't be treated as a fatal error.
64 (John Arbash Meinel, #1075108)62 (John Arbash Meinel, #1075108)
6563
64* Teach the bzr client how to reconnect if we get ``ConnectionReset``
65 while making an RPC request. This doesn't handle all possible network
66 disconnects, but it should at least handle when the server is asked to
67 shutdown gracefully. This is a backport of the functionality in bzr-2.5.
68 (John Arbash Meinel, #819604)
69
66* Use ``encoding_type='exact'`` for ``bzr testament`` so that on Windows70* Use ``encoding_type='exact'`` for ``bzr testament`` so that on Windows
67 the sha hash of the long testament matches the sha hash in the short71 the sha hash of the long testament matches the sha hash in the short
68 form. (John Arbash Meinel, #1010339)72 form. (John Arbash Meinel, #1010339)
6973
74* When the ``limbo`` or ``pending-deletion`` directories exist, typically
75 because of an interrupted tree update, but are empty, bzr no longer
76 errors out, because there is nothing for the user to clean up. Also,
77 errors in creation of these directories are no longer squelched.
78 (Martin Pool, #427773)
79
70* _Win32Stat object provides members st_uid and st_gid, those are present80* _Win32Stat object provides members st_uid and st_gid, those are present
71 in Python's os.stat object. These members required for external tools like81 in Python's os.stat object. These members required for external tools like
72 bzr-git and dulwich. (Alexander Belchenko, #967060)82 bzr-git and dulwich. (Alexander Belchenko, #967060)
@@ -144,7 +154,7 @@
144* Return early from create_delta_index_from_delta given tiny inputs. This154* Return early from create_delta_index_from_delta given tiny inputs. This
145 avoids raising a spurious MemoryError on certain platforms such as AIX.155 avoids raising a spurious MemoryError on certain platforms such as AIX.
146 (John Arbash Meinel, #856731)156 (John Arbash Meinel, #856731)
147157
148Documentation158Documentation
149*************159*************
150160