949
949
self.do_iter_changes(tree1, tree2))
951
def test_file_becomes_unversionable_bug_438569(self):
952
# This isn't strictly a intertree problem, but its the intertree code
953
# path that triggers all stat cache updates on both xml and dirstate
955
# In bug 438569, a file becoming a fifo causes an assert. Fifo's are
956
# not versionable or diffable. For now, we simply stop cold when they
957
# are detected (because we don't know how far through the code the
958
# assumption 'fifo's do not exist' goes). In future we could report
959
# the kind change and have commit refuse to go futher, or something
960
# similar. One particular reason for choosing this approach is that
961
# there is no minikind for 'fifo' in dirstate today, so we can't
962
# actually update records that way.
963
# To add confusion, the totally generic code path works - but it
964
# doesn't update persistent metadata. So this test permits InterTrees
965
# to either work, or fail with BadFileKindError.
966
self.requireFeature(tests.OsFifoFeature)
967
tree1 = self.make_branch_and_tree('1')
968
self.build_tree(['1/a'])
969
tree1.set_root_id('root-id')
970
tree1.add(['a'], ['a-id'])
971
tree2 = self.make_branch_and_tree('2')
973
tree2.add(['a'], ['a-id'], ['file'])
975
tree1, tree2 = self.mutable_trees_to_test_trees(self, tree1, tree2)
977
raise tests.TestNotApplicable(
978
"Cannot represent a FIFO in this case %s" % self.id())
980
self.do_iter_changes(tree1, tree2)
981
except errors.BadFileKindError:
951
984
def test_missing_in_target(self):
952
985
"""Test with the target files versioned but absent from disk."""
953
986
tree1 = self.make_branch_and_tree('1')