annotate tests/test_binaryfiles.py @ 960:502613f6b583

editor: ignore added or copied files excluded by a filemap Files brought by a copied add_directory() were processed despite being excluded by the filemap. This was also the case with added files. The conversion was still correct because they were eventually filtered out in the replay.convert_rev() but processing them in itself may be problematic. Filemaps are often use to exclude large binary files and before this change, some of them could be marked as missing and be fetched before being discarded. A test configuration entry named hgsubversion.failoninvalidreplayfile was added to help testing this case. It should become the default behaviour in the future.
author Patrick Mezard <patrick@mezard.eu>
date Sun, 14 Oct 2012 15:51:12 +0200
parents 312b37bc5e20
children d741f536f23a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
169
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
1 import test_util
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
2
643
d2ef7220a079 tests: import test_util as the first module in all relevant tests
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 195
diff changeset
3 import unittest
d2ef7220a079 tests: import test_util as the first module in all relevant tests
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 195
diff changeset
4
169
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
5 class TestFetchBinaryFiles(test_util.TestBase):
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
6 def test_binaryfiles(self, stupid=False):
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
7 repo = self._load_fixture_and_fetch('binaryfiles.svndump', stupid=stupid)
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
8 self.assertEqual('cce7fe400d8d', str(repo['tip']))
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
9
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
10 def test_binaryfiles_stupid(self):
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
11 self.test_binaryfiles(True)
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
12
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
13 def suite():
833
312b37bc5e20 tests: avoid shadowing Python builtin all()
Yonggang Luo <luoyonggang@gmail.com>
parents: 643
diff changeset
14 all_tests = [unittest.TestLoader().loadTestsFromTestCase(TestFetchBinaryFiles),
169
f1919e1c35bf fetch_command: cancel patching when encountering binary diffs
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
15 ]
833
312b37bc5e20 tests: avoid shadowing Python builtin all()
Yonggang Luo <luoyonggang@gmail.com>
parents: 643
diff changeset
16 return unittest.TestSuite(all_tests)