Mercurial > kallithea
diff rhodecode/tests/vcs/test_repository.py @ 2995:32471bd1f4ee beta
Implemented generation of changesets based
on whole diff instead of per file diff. That
can give a big speed improvement for large changesets in
repositories with large history.
- improved handling of binary files
- show renames of binary files
- implemented new diff limit functionality
- unify diff generation between hg and git
- Added binary indicators for changed files,
- added diff lib tests
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 05 Nov 2012 19:57:29 +0100 |
parents | 402a96fcfa22 |
children | 5f9f4ece4b52 d7a5da0d78ef |
line wrap: on
line diff
--- a/rhodecode/tests/vcs/test_repository.py Fri Nov 09 19:33:20 2012 +0100 +++ b/rhodecode/tests/vcs/test_repository.py Mon Nov 05 19:57:29 2012 +0100 @@ -74,6 +74,7 @@ with self.assertRaises(ChangesetDoesNotExistError): self.repo.get_diff('a' * 40, 'b' * 40) + class GitRepositoryGetDiffTest(RepositoryGetDiffTest, unittest.TestCase): backend_alias = 'git' @@ -81,7 +82,7 @@ initial_rev = self.repo.revisions[0] self.assertEqual(self.repo.get_diff(self.repo.EMPTY_CHANGESET, initial_rev), '''diff --git a/foobar b/foobar new file mode 100644 -index 0000000..f6ea049 +index 0000000000000000000000000000000000000000..f6ea0495187600e7b2288c8ac19c5886383a4632 --- /dev/null +++ b/foobar @@ -0,0 +1 @@ @@ -89,7 +90,7 @@ \ No newline at end of file diff --git a/foobar2 b/foobar2 new file mode 100644 -index 0000000..e8c9d6b +index 0000000000000000000000000000000000000000..e8c9d6b98e3dce993a464935e1a53f50b56a3783 --- /dev/null +++ b/foobar2 @@ -0,0 +1 @@ @@ -100,7 +101,7 @@ def test_second_changeset_diff(self): revs = self.repo.revisions self.assertEqual(self.repo.get_diff(revs[0], revs[1]), '''diff --git a/foobar b/foobar -index f6ea049..389865b 100644 +index f6ea0495187600e7b2288c8ac19c5886383a4632..389865bb681b358c9b102d79abd8d5f941e96551 100644 --- a/foobar +++ b/foobar @@ -1 +1 @@ @@ -110,7 +111,7 @@ \ No newline at end of file diff --git a/foobar3 b/foobar3 new file mode 100644 -index 0000000..c11c37d +index 0000000000000000000000000000000000000000..c11c37d41d33fb47741cff93fa5f9d798c1535b0 --- /dev/null +++ b/foobar3 @@ -0,0 +1 @@ @@ -122,14 +123,14 @@ revs = self.repo.revisions self.assertEqual(self.repo.get_diff(revs[1], revs[2]), '''diff --git a/foobar b/foobar deleted file mode 100644 -index 389865b..0000000 +index 389865bb681b358c9b102d79abd8d5f941e96551..0000000000000000000000000000000000000000 --- a/foobar +++ /dev/null @@ -1 +0,0 @@ -FOOBAR \ No newline at end of file diff --git a/foobar3 b/foobar3 -index c11c37d..f932447 100644 +index c11c37d41d33fb47741cff93fa5f9d798c1535b0..f9324477362684ff692aaf5b9a81e01b9e9a671c 100644 --- a/foobar3 +++ b/foobar3 @@ -1 +1,3 @@