32 side. |
32 side. |
33 |
33 |
34 @param a first sequence of lines (list of strings) |
34 @param a first sequence of lines (list of strings) |
35 @param b second sequence of lines (list of strings) |
35 @param b second sequence of lines (list of strings) |
36 @param linenumberwidth width (in characters) of the linenumbers (integer) |
36 @param linenumberwidth width (in characters) of the linenumbers (integer) |
37 @return a generator yielding tuples of differences. The tuple is composed |
37 @yield tuples of differences. Each tuple is composed of strings as follows. |
38 of strings as follows. |
|
39 <ul> |
38 <ul> |
40 <li>opcode -- one of e, d, i, r for equal, delete, insert, |
39 <li>opcode -- one of e, d, i, r for equal, delete, insert, |
41 replace</li> |
40 replace</li> |
42 <li>lineno a -- linenumber of sequence a</li> |
41 <li>lineno a -- linenumber of sequence a</li> |
43 <li>line a -- line of sequence a</li> |
42 <li>line a -- line of sequence a</li> |
44 <li>lineno b -- linenumber of sequence b</li> |
43 <li>lineno b -- linenumber of sequence b</li> |
45 <li>line b -- line of sequence b</li> |
44 <li>line b -- line of sequence b</li> |
46 </ul> |
45 </ul> |
47 """ |
46 @ytype tuple of (str, str, str, str, str) |
|
47 """ |
|
48 # __IGNORE_WARNING_D234r__ |
48 def removeMarkers(line): |
49 def removeMarkers(line): |
49 """ |
50 """ |
50 Internal function to remove all diff markers. |
51 Internal function to remove all diff markers. |
51 |
52 |
52 @param line line to work on (string) |
53 @param line line to work on (string) |
267 """ |
268 """ |
268 Public method to compare two lists of text. |
269 Public method to compare two lists of text. |
269 |
270 |
270 @param lines1 text to compare against (string or list of strings) |
271 @param lines1 text to compare against (string or list of strings) |
271 @param lines2 text to compare (string or list of strings) |
272 @param lines2 text to compare (string or list of strings) |
272 @keyparam name1 name to be shown for the first text (string) |
273 @param name1 name to be shown for the first text (string) |
273 @keyparam name2 name to be shown for the second text (string) |
274 @param name2 name to be shown for the second text (string) |
274 """ |
275 """ |
275 if name1 == "" or name2 == "": |
276 if name1 == "" or name2 == "": |
276 self.filesGroup.hide() |
277 self.filesGroup.hide() |
277 else: |
278 else: |
278 self.file1Picker.setText(name1) |
279 self.file1Picker.setText(name1) |