Rev 6063: Address some points from gz's review. in file:///home/vila/src/bzr/bugs/880701-resolve-duplicate/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Oct 27 12:26:48 UTC 2011
At file:///home/vila/src/bzr/bugs/880701-resolve-duplicate/
------------------------------------------------------------
revno: 6063
revision-id: v.ladeuil+lp at free.fr-20111027122648-x4b85k69pyrbpbkk
parent: v.ladeuil+lp at free.fr-20111027083934-jd8lddhrked4rcpu
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 880701-resolve-duplicate
timestamp: Thu 2011-10-27 14:26:48 +0200
message:
Address some points from gz's review.
-------------- next part --------------
=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py 2011-10-26 16:58:18 +0000
+++ b/bzrlib/merge.py 2011-10-27 12:26:48 +0000
@@ -1389,6 +1389,9 @@
if hook_status != 'not_applicable':
# Don't try any more hooks, this one applies.
break
+ # If the merge ends up replacing the content of the file, we get rid of
+ # it at the end of this method (this variable is used to track the
+ # exceptions to this rule).
keep_this = False
result = "modified"
if hook_status == 'not_applicable':
@@ -1456,8 +1459,8 @@
if not self.this_tree.has_id(file_id) and result == "modified":
self.tt.version_file(file_id, trans_id)
if not keep_this:
- # The merge has been performed, so the old contents should not be
- # retained.
+ # The merge has been performed and produced a new content, so the
+ # old contents should not be retained.
self.tt.delete_contents(trans_id)
return result
@@ -1553,20 +1556,17 @@
def _get_filter_tree_path(self, file_id):
- wt = self.this_tree
- if wt.supports_content_filtering():
+ if self.this_tree.supports_content_filtering():
# We get the path from the working tree if it exists.
# That fails though when OTHER is adding a file, so
# we fall back to the other tree to find the path if
# it doesn't exist locally.
try:
- filter_tree_path = wt.id2path(file_id)
+ return self.this_tree.id2path(file_id)
except errors.NoSuchId:
- filter_tree_path = self.other_tree.id2path(file_id)
- else:
- # Skip the id2path lookup for older formats
- filter_tree_path = None
- return filter_tree_path
+ return self.other_tree.id2path(file_id)
+ # Skip the id2path lookup for older formats
+ return None
def _dump_conflicts(self, name, parent_id, file_id, this_lines=None,
base_lines=None, other_lines=None, set_version=False,
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt 2011-10-27 08:39:34 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt 2011-10-27 12:26:48 +0000
@@ -32,6 +32,12 @@
Bug Fixes
*********
+* During merges, when two entries end up using the same path for two
+ different file-ids (the same file being 'bzr added' in two different
+ branches) , 'duplicate' conflicts are created instead of 'content'
+ ones. This was previously leading to a 'Malformed tramsform' exception.
+ (Vincent Ladeuil, #880701)
+
* Fixed an infinite loop when creating a repo at the root of the filesystem,
i.e. "/", due to posixpath.normpath() not collapsing 2 leading slashes into
one, thus respecting the POSIX standard, but making relpath() loop infinitely.
@@ -40,13 +46,14 @@
* Fixed loading of external merge tools from config to properly decode
command-lines which contain embedded quotes. (Gordon Tyler, #828803)
-* 'Duplicate' conflicts are now created instead of 'Content' ones when a
- merge tries to create two entries for the same path.
- (Vincent Ladeuil, #880701)
-
* Include declaration of 'changed' to avoid an UnboundLocalError in dirstate
pyrex code with new Cython versions. (Denys Duchier, #837221)
+* 'Malformed transform' exceptions are now recognized as internal errors
+ instead of user errors and report a traceback. This will reduce user
+ confusion as there is generally nothing users can do about them.
+ (Vincent Ladeuil, #880701)
+
* Prevent several kinds of OverflowError and other fallout from failing to fit
stat fields into four bytes in dirstate pack_stat implementations.
(Martin Packman, #683191 #706957)
@@ -54,6 +61,7 @@
* Return early from create_delta_index_from_delta given tiny inputs. This
avoids raising a spurious MemoryError on certain platforms such as AIX.
(John Arbash Meinel, #856731)
+
Documentation
*************
More information about the bazaar-commits
mailing list