Mercurial > kallithea
annotate rhodecode/tests/models/test_diff_parsers.py @ 4007:3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
on diff parser
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 17 Jun 2013 20:10:47 +0200 |
parents | 156cb1cdd7ad |
children | ffd45b185016 |
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 |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 import os |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 from rhodecode.tests import * |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 from rhodecode.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
|
5 MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 dn = os.path.dirname |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 FIXTURES = os.path.join(dn(dn(os.path.abspath(__file__))), 'fixtures') |
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': [ |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
29 ('README', 'M', |
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, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
33 'ops': {MOD_FILENODE: 'modified file', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
34 RENAMED_FILENODE: 'file renamed from README.rst to README', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
35 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
|
36 ], |
3893
7e9776f38c55
fixed duplicated test in diff tests
Marcin Kuzminski <marcin@python-works.com>
parents:
3829
diff
changeset
|
37 'hg_diff_mod_file_and_rename.diff': [ |
7e9776f38c55
fixed duplicated test in diff tests
Marcin Kuzminski <marcin@python-works.com>
parents:
3829
diff
changeset
|
38 ('README.rst', 'M', |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
39 {'added': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
40 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
41 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
42 'ops': {MOD_FILENODE: 'modified file', |
3893
7e9776f38c55
fixed duplicated test in diff tests
Marcin Kuzminski <marcin@python-works.com>
parents:
3829
diff
changeset
|
43 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
|
44 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
45 '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
|
46 ('US Warszawa.jpg', 'D', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
47 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
48 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
49 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
50 'ops': {DEL_FILENODE: 'deleted file', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
51 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
52 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
53 '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
|
54 ('gravatar.png', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
55 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
56 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
57 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
58 '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
|
59 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
60 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
61 'hg_diff_chmod.diff': [ |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
62 ('file', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
63 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
64 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
65 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
66 '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
|
67 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
68 'hg_diff_rename_file.diff': [ |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
69 ('file_renamed', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
70 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
71 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
72 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
73 '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
|
74 ], |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
75 'hg_diff_rename_and_chmod_file.diff': [ |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
76 ('README', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
77 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
78 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
79 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
80 '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
|
81 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
|
82 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
83 '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
|
84 ('img/baseline-10px.png', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
85 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
86 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
87 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
88 'ops': {NEW_FILENODE: 'new file 100644', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
89 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
90 ('js/jquery/hashgrid.js', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
91 {'added': 340, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
92 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
93 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
94 'ops': {NEW_FILENODE: 'new file 100755'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
95 ('index.html', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
96 {'added': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
97 'deleted': 2, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
98 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
99 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
100 ('less/docs.less', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
101 {'added': 34, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
102 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
103 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
104 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
105 ('less/scaffolding.less', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
106 {'added': 1, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
107 'deleted': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
108 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
109 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
110 ('readme.markdown', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
111 {'added': 1, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
112 'deleted': 10, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
113 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
114 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
115 ('img/baseline-20px.png', 'D', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
116 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
117 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
118 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
119 'ops': {DEL_FILENODE: 'deleted file', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
120 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
121 ('js/global.js', 'D', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
122 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
123 'deleted': 75, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
124 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
125 'ops': {DEL_FILENODE: 'deleted file'}}) |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
126 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
127 'git_diff_chmod.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
128 ('work-horus.xls', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
129 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
130 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
131 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
132 'ops': {CHMOD_FILENODE: 'modified file chmod 100644 => 100755'}}) |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
133 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
134 'git_diff_rename_file.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
135 ('file.xls', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
136 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
137 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
138 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
139 '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
|
140 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
141 '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
|
142 ('US Warszawa.jpg', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
143 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
144 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
145 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
146 'ops': {MOD_FILENODE: 'modified file', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
147 BIN_FILENODE: 'binary diff not shown'}}) |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
148 ], |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
149 '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
|
150 ('img/baseline-10px.png', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
151 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
152 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
153 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
154 'ops': {NEW_FILENODE: 'new file 100644', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
155 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
156 ('js/jquery/hashgrid.js', 'A', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
157 {'added': 340, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
158 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
159 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
160 'ops': {NEW_FILENODE: 'new file 100755'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
161 ('index.html', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
162 {'added': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
163 'deleted': 2, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
164 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
165 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
166 ('less/docs.less', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
167 {'added': 34, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
168 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
169 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
170 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
171 ('less/scaffolding.less', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
172 {'added': 1, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
173 'deleted': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
174 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
175 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
176 ('readme.markdown', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
177 {'added': 1, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
178 'deleted': 10, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
179 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
180 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
181 ('img/baseline-20px.png', 'D', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
182 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
183 'deleted': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
184 'binary': True, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
185 'ops': {DEL_FILENODE: 'deleted file', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
186 BIN_FILENODE: 'binary diff not shown'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
187 ('js/global.js', 'D', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
188 {'added': 0, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
189 'deleted': 75, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
190 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
191 'ops': {DEL_FILENODE: 'deleted file'}}), |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
192 ], |
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
|
193 'diff_with_diff_data.diff': [ |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
194 ('vcs/backends/base.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
195 {'added': 18, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
196 'deleted': 2, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
197 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
198 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
199 ('vcs/backends/git/repository.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
200 {'added': 46, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
201 'deleted': 15, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
202 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
203 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
204 ('vcs/backends/hg.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
205 {'added': 22, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
206 'deleted': 3, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
207 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
208 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
209 ('vcs/tests/test_git.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
210 {'added': 5, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
211 'deleted': 5, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
212 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
213 'ops': {MOD_FILENODE: 'modified file'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
214 ('vcs/tests/test_repository.py', 'M', |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
215 {'added': 174, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
216 'deleted': 2, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
217 'binary': False, |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
218 '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
|
219 ], |
3997
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
220 'hg_diff_copy_file.diff': [ |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
221 ('file2', 'M', |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
222 {'added': 0, |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
223 'deleted': 0, |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
224 'binary': True, |
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
225 '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
|
226 ], |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
227 '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
|
228 ('file3', 'M', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
229 {'added': 1, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
230 'deleted': 0, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
231 'binary': False, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
232 '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
|
233 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
|
234 ], |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
235 '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
|
236 ('file4', 'M', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
237 {'added': 0, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
238 'deleted': 0, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
239 'binary': True, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
240 '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
|
241 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
|
242 ], |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
243 '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
|
244 ('file5', 'M', |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
245 {'added': 2, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
246 'deleted': 1, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
247 'binary': False, |
3e8f48ccca86
Added some missing tests for copy+chmod, copy+chmod+modify
Marcin Kuzminski <marcin@python-works.com>
parents:
3997
diff
changeset
|
248 '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
|
249 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
|
250 MOD_FILENODE: 'modified file'}}), |
3997
156cb1cdd7ad
Added handling of copied files diff parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
3893
diff
changeset
|
251 ] |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
252 # 'large_diff.diff': [ |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
253 # ('.hgignore', 'A', {'deleted': 0, 'binary': False, 'added': 3, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
254 # ('MANIFEST.in', 'A', {'deleted': 0, 'binary': False, 'added': 3, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
255 # ('README.txt', 'A', {'deleted': 0, 'binary': False, 'added': 19, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
256 # ('development.ini', 'A', {'deleted': 0, 'binary': False, 'added': 116, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
257 # ('docs/index.txt', 'A', {'deleted': 0, 'binary': False, 'added': 19, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
258 # ('ez_setup.py', 'A', {'deleted': 0, 'binary': False, 'added': 276, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
259 # ('hgapp.py', 'A', {'deleted': 0, 'binary': False, 'added': 26, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
260 # ('hgwebdir.config', 'A', {'deleted': 0, 'binary': False, 'added': 21, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
261 # ('pylons_app.egg-info/PKG-INFO', 'A', {'deleted': 0, 'binary': False, 'added': 10, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
262 # ('pylons_app.egg-info/SOURCES.txt', 'A', {'deleted': 0, 'binary': False, 'added': 33, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
263 # ('pylons_app.egg-info/dependency_links.txt', 'A', {'deleted': 0, 'binary': False, 'added': 1, 'ops': {1: 'new file 100644'}}), |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
264 # #TODO: |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
265 # ], |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
266 |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
267 } |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
268 |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
269 |
3829
5067d6e826a5
created basic TestClass for tests that does
Marcin Kuzminski <marcin@python-works.com>
parents:
3821
diff
changeset
|
270 class DiffLibTest(BaseTestCase): |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
271 |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
272 @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
|
273 def test_diff(self, diff_fixture): |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
274 |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
275 with open(os.path.join(FIXTURES, diff_fixture)) as f: |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
276 diff = f.read() |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
277 |
3821
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
278 diff_proc = DiffProcessor(diff) |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
279 diff_proc_d = diff_proc.prepare() |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
280 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
|
281 expected_data = DIFF_FIXTURES[diff_fixture] |
ce4b7023a492
diff parser: redefined operations stats for changes
Marcin Kuzminski <marcin@python-works.com>
parents:
3035
diff
changeset
|
282 self.assertListEqual(expected_data, data) |