Rev 3516: Revert back, and just assume that None means not present. in http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/merge3_per_file
John Arbash Meinel
john at arbash-meinel.com
Tue Jun 24 23:46:09 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/merge3_per_file
------------------------------------------------------------
revno: 3516
revision-id: john at arbash-meinel.com-20080624224607-0ut2x6l0h2928qnv
parent: john at arbash-meinel.com-20080624223602-tsf3z7jj3h88k2d8
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: merge3_per_file
timestamp: Tue 2008-06-24 17:46:07 -0500
message:
Revert back, and just assume that None means not present.
modified:
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
-------------- next part --------------
=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py 2008-06-24 22:36:02 +0000
+++ b/bzrlib/merge.py 2008-06-24 22:46:07 +0000
@@ -463,10 +463,6 @@
return len(merge.cooked_conflicts)
-# A singleton we can use for comparisons
-_not_present_in_tree = object()
-
-
class Merge3Merger(object):
"""Three-way merger that uses the merge3 text merger"""
requires_base = True
@@ -650,8 +646,6 @@
other_values = {}
all_changed = {}
- not_present = (_not_present_in_tree, _not_present_in_tree,
- _not_present_in_tree)
# XXX: It seems we have to go in an appropriate ordering. We probably
# just have to iterate all parents before their children, but I'm
# not clear what the specific requirement is (it seems to be
@@ -682,10 +676,7 @@
if file_id not in other_values:
file_id_ordering.append(file_id)
other_values[file_id] = parents[1], names[1], executable[1]
- if (parents[0], names[0], executable[0]) == (None, None, None):
- base_values[file_id] = not_present
- else:
- base_values[file_id] = parents[0], names[0], executable[0]
+ base_values[file_id] = parents[0], names[0], executable[0]
# We filled in everything we could as we went along, now we need to
# make sure we have all the base and this information
@@ -694,8 +685,7 @@
entry = the_inventory[file_id]
return (entry.parent_id, entry.name, entry.executable)
else:
- return (_not_present_in_tree, _not_present_in_tree,
- _not_present_in_tree)
+ return (None, None, None)
this_values = {}
this_inventory = self.this_tree.inventory
@@ -832,7 +822,7 @@
"""
base_first = bases[0]
for base in bases[1:]:
- if base is not _not_present_in_tree and base_first != base:
+ if base is not None and base_first != base:
break
else: # All the bases are identical, we can just use 3-way
return Merge3Merger._three_way(base_first, other, this)
More information about the bazaar-commits
mailing list