Mercurial > kallithea
annotate kallithea/tests/models/test_diff_parsers.py @ 4634:fbf75412c609
diff: add op for renamed file
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Fri, 14 Nov 2014 16:48:40 -0800 |
parents | cd9bb3e07e68 |
children | 7b8cbcb927b2 |
rev | line source |
---|---|
3035
fb1709520112
fix tests for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents:
3022
diff
changeset
|
1 from __future__ import with_statement |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4116
diff
changeset
|
2 from kallithea.tests import * |
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4116
diff
changeset
|
3 from kallithea.lib.diffs import DiffProcessor, NEW_FILENODE, DEL_FILENODE, \ |
3997
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
4 MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4116
diff
changeset
|
5 from kallithea.tests.fixture import Fixture |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4007
diff
changeset
|
7 fixture = Fixture() |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4007
diff
changeset
|
8 |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 DIFF_FIXTURES = { |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 'hg_diff_add_single_binary_file.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
12 ('US Warszawa.jpg', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
13 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
14 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
15 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
16 'ops': {NEW_FILENODE: 'new file 100755', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
17 BIN_FILENODE: 'binary diff not shown'}}), |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 'hg_diff_mod_single_binary_file.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
20 ('US Warszawa.jpg', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
21 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
22 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
23 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
24 'ops': {MOD_FILENODE: 'modified file', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
25 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
26 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
27 |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
28 'hg_diff_mod_single_file_and_rename_and_chmod.diff': [ |
4634
fbf75412c609
diff: add op for renamed file
Sean Farley <sean.michael.farley@gmail.com>
parents:
4507
diff
changeset
|
29 ('README', 'R', |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
30 {'added': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
31 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
32 'binary': False, |
4634
fbf75412c609
diff: add op for renamed file
Sean Farley <sean.michael.farley@gmail.com>
parents:
4507
diff
changeset
|
33 'ops': {RENAMED_FILENODE: 'file renamed from README.rst to README', |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
34 CHMOD_FILENODE: 'modified file chmod 100755 => 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
35 ], |
3893
7e9776f38c55
fixed duplicated test in diff tests
Marcin Kuzminski <marcin@python-works.com>
parents:
3829
diff
changeset
|
36 'hg_diff_mod_file_and_rename.diff': [ |
4634
fbf75412c609
diff: add op for renamed file
Sean Farley <sean.michael.farley@gmail.com>
parents:
4507
diff
changeset
|
37 ('README.rst', 'R', |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
38 {'added': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
39 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
40 'binary': False, |
4634
fbf75412c609
diff: add op for renamed file
Sean Farley <sean.michael.farley@gmail.com>
parents:
4507
diff
changeset
|
41 'ops': {RENAMED_FILENODE: 'file renamed from README to README.rst'}}), |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
43 'hg_diff_del_single_binary_file.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
44 ('US Warszawa.jpg', 'D', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
45 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
46 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
47 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
48 'ops': {DEL_FILENODE: 'deleted file', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
49 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
50 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
51 'hg_diff_chmod_and_mod_single_binary_file.diff': [ |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
52 ('gravatar.png', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
53 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
54 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
55 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
56 'ops': {CHMOD_FILENODE: 'modified file chmod 100644 => 100755', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
57 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
58 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
59 'hg_diff_chmod.diff': [ |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
60 ('file', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
61 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
62 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
63 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
64 'ops': {CHMOD_FILENODE: 'modified file chmod 100755 => 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
65 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
66 'hg_diff_rename_file.diff': [ |
4634
fbf75412c609
diff: add op for renamed file
Sean Farley <sean.michael.farley@gmail.com>
parents:
4507
diff
changeset
|
67 ('file_renamed', 'R', |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
68 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
69 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
70 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
71 'ops': {RENAMED_FILENODE: 'file renamed from file to file_renamed'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
72 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
73 'hg_diff_rename_and_chmod_file.diff': [ |
4634
fbf75412c609
diff: add op for renamed file
Sean Farley <sean.michael.farley@gmail.com>
parents:
4507
diff
changeset
|
74 ('README', 'R', |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
75 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
76 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
77 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
78 'ops': {CHMOD_FILENODE: 'modified file chmod 100644 => 100755', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
79 RENAMED_FILENODE: 'file renamed from README.rst to README'}}), |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
80 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
81 'hg_diff_binary_and_normal.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
82 ('img/baseline-10px.png', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
83 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
84 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
85 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
86 'ops': {NEW_FILENODE: 'new file 100644', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
87 BIN_FILENODE: 'binary diff not shown'}}), |
4507
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
88 ('img/baseline-20px.png', 'D', |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
89 {'added': 0, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
90 'deleted': 0, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
91 'binary': True, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
92 'ops': {DEL_FILENODE: 'deleted file', |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
93 BIN_FILENODE: 'binary diff not shown'}}), |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
94 ('index.html', 'M', |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
95 {'added': 3, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
96 'deleted': 2, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
97 'binary': False, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
98 'ops': {MOD_FILENODE: 'modified file'}}), |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
99 ('js/global.js', 'D', |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
100 {'added': 0, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
101 'deleted': 75, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
102 'binary': False, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
103 'ops': {DEL_FILENODE: 'deleted file'}}), |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
104 ('js/jquery/hashgrid.js', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
105 {'added': 340, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
106 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
107 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
108 'ops': {NEW_FILENODE: 'new file 100755'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
109 ('less/docs.less', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
110 {'added': 34, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
111 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
112 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
113 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
114 ('less/scaffolding.less', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
115 {'added': 1, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
116 'deleted': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
117 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
118 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
119 ('readme.markdown', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
120 {'added': 1, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
121 'deleted': 10, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
122 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
123 'ops': {MOD_FILENODE: 'modified file'}}), |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
124 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
125 'git_diff_chmod.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
126 ('work-horus.xls', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
127 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
128 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
129 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
130 'ops': {CHMOD_FILENODE: 'modified file chmod 100644 => 100755'}}) |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
131 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
132 'git_diff_rename_file.diff': [ |
4634
fbf75412c609
diff: add op for renamed file
Sean Farley <sean.michael.farley@gmail.com>
parents:
4507
diff
changeset
|
133 ('file.xls', 'R', |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
134 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
135 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
136 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
137 'ops': {RENAMED_FILENODE: 'file renamed from work-horus.xls to file.xls'}}) |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
138 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
139 'git_diff_mod_single_binary_file.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
140 ('US Warszawa.jpg', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
141 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
142 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
143 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
144 'ops': {MOD_FILENODE: 'modified file', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
145 BIN_FILENODE: 'binary diff not shown'}}) |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
146 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
147 'git_diff_binary_and_normal.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
148 ('img/baseline-10px.png', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
149 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
150 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
151 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
152 'ops': {NEW_FILENODE: 'new file 100644', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
153 BIN_FILENODE: 'binary diff not shown'}}), |
4507
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
154 ('img/baseline-20px.png', 'D', |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
155 {'added': 0, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
156 'deleted': 0, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
157 'binary': True, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
158 'ops': {DEL_FILENODE: 'deleted file', |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
159 BIN_FILENODE: 'binary diff not shown'}}), |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
160 ('index.html', 'M', |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
161 {'added': 3, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
162 'deleted': 2, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
163 'binary': False, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
164 'ops': {MOD_FILENODE: 'modified file'}}), |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
165 ('js/global.js', 'D', |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
166 {'added': 0, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
167 'deleted': 75, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
168 'binary': False, |
cd9bb3e07e68
diff: don't group diffs based on the kind of change
Mads Kiilerich <madski@unity3d.com>
parents:
4505
diff
changeset
|
169 'ops': {DEL_FILENODE: 'deleted file'}}), |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
170 ('js/jquery/hashgrid.js', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
171 {'added': 340, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
172 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
173 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
174 'ops': {NEW_FILENODE: 'new file 100755'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
175 ('less/docs.less', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
176 {'added': 34, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
177 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
178 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
179 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
180 ('less/scaffolding.less', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
181 {'added': 1, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
182 'deleted': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
183 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
184 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
185 ('readme.markdown', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
186 {'added': 1, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
187 'deleted': 10, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
188 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
189 'ops': {MOD_FILENODE: 'modified file'}}), |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
190 ], |
3022
0ed42ca7ff9e
Fixed issue with inproper handling of diff parsing that could lead to infinit loops.
Marcin Kuzminski <marcin@python-works.com>
parents:
2995
diff
changeset
|
191 'diff_with_diff_data.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
192 ('vcs/backends/base.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
193 {'added': 18, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
194 'deleted': 2, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
195 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
196 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
197 ('vcs/backends/git/repository.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
198 {'added': 46, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
199 'deleted': 15, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
200 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
201 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
202 ('vcs/backends/hg.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
203 {'added': 22, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
204 'deleted': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
205 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
206 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
207 ('vcs/tests/test_git.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
208 {'added': 5, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
209 'deleted': 5, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
210 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
211 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
212 ('vcs/tests/test_repository.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
213 {'added': 174, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
214 'deleted': 2, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
215 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
216 'ops': {MOD_FILENODE: 'modified file'}}), |
3022
0ed42ca7ff9e
Fixed issue with inproper handling of diff parsing that could lead to infinit loops.
Marcin Kuzminski <marcin@python-works.com>
parents:
2995
diff
changeset
|
217 ], |
3997
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
218 'hg_diff_copy_file.diff': [ |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
219 ('file2', 'M', |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
220 {'added': 0, |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
221 'deleted': 0, |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
222 'binary': True, |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
223 'ops': {COPIED_FILENODE: 'file copied from file1 to file2'}}), |
4007
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
224 ], |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
225 'hg_diff_copy_and_modify_file.diff': [ |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
226 ('file3', 'M', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
227 {'added': 1, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
228 'deleted': 0, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
229 'binary': False, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
230 'ops': {COPIED_FILENODE: 'file copied from file2 to file3', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
231 MOD_FILENODE: 'modified file'}}), |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
232 ], |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
233 'hg_diff_copy_and_chmod_file.diff': [ |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
234 ('file4', 'M', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
235 {'added': 0, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
236 'deleted': 0, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
237 'binary': True, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
238 'ops': {COPIED_FILENODE: 'file copied from file3 to file4', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
239 CHMOD_FILENODE: 'modified file chmod 100644 => 100755'}}), |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
240 ], |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
241 'hg_diff_copy_chmod_and_edit_file.diff': [ |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
242 ('file5', 'M', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
243 {'added': 2, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
244 'deleted': 1, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
245 'binary': False, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
246 'ops': {COPIED_FILENODE: 'file copied from file4 to file5', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
247 CHMOD_FILENODE: 'modified file chmod 100755 => 100644', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
248 MOD_FILENODE: 'modified file'}}), |
3997
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
249 ] |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
250 } |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
251 |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
252 |
3829
5067d6e826a5
created basic TestClass for tests that does
Marcin Kuzminski <marcin@python-works.com>
parents:
3821
diff
changeset
|
253 class DiffLibTest(BaseTestCase): |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
254 |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
255 @parameterized.expand([(x,) for x in DIFF_FIXTURES]) |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
256 def test_diff(self, diff_fixture): |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
257 |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4007
diff
changeset
|
258 diff = fixture.load_resource(diff_fixture) |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
259 |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
260 diff_proc = DiffProcessor(diff) |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
261 diff_proc_d = diff_proc.prepare() |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
262 data = [(x['filename'], x['operation'], x['stats']) for x in diff_proc_d] |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
263 expected_data = DIFF_FIXTURES[diff_fixture] |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
264 self.assertListEqual(expected_data, data) |