Check-in [671a71a887]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Revise write_significant_line_diff() function nested in file_diff() function in the utilities.py import module so that it writes a line pair with difference(s) only once.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:671a71a8873825456dbb14cd086b255f0e788b05
User & Date: mrh 2015-06-02 04:27:02
Context
2015-06-02
15:21
Revise nested functions in utilities.py module file_diff() function to handle line pairs with unequal number of tokens. check-in: a58cf2a418 user: mrh tags: trunk
04:27
Revise write_significant_line_diff() function nested in file_diff() function in the utilities.py import module so that it writes a line pair with difference(s) only once. check-in: 671a71a887 user: mrh tags: trunk
2015-05-21
11:28
Revise two www/*.wiki documents to reflect change in cap_frac from a decimal to percentage fraction. check-in: 2a00dfc659 user: mrh tags: trunk
Changes

Changes to utilities.py.

129
130
131
132
133
134
135

136
137
138
139
140
141
142
143
                    # write modified act_line and exp_line to stdout
                    line = act_line.replace('!', (act_filename + ':\n'), 1)
                    sys.stdout.write(line + '\n')
                    line = exp_line.replace('!', (exp_filename + ':\n'), 1)
                    sys.stdout.write(line + '\n')
                    line = '----------------------------------------------'
                    sys.stdout.write(line + '\n')

    # end of write_significant_line_diff code
    # ... end of nested functions code

    # write only significant differences to stdout
    diff_list = all_diffs_string.split('***************\n')
    for diff in diff_list[1:]: # skip header item in diff_list
        process_diff_block(diff)
# end of file_diff function code







>








129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
                    # write modified act_line and exp_line to stdout
                    line = act_line.replace('!', (act_filename + ':\n'), 1)
                    sys.stdout.write(line + '\n')
                    line = exp_line.replace('!', (exp_filename + ':\n'), 1)
                    sys.stdout.write(line + '\n')
                    line = '----------------------------------------------'
                    sys.stdout.write(line + '\n')
                    break # write line pair with diff only once
    # end of write_significant_line_diff code
    # ... end of nested functions code

    # write only significant differences to stdout
    diff_list = all_diffs_string.split('***************\n')
    for diff in diff_list[1:]: # skip header item in diff_list
        process_diff_block(diff)
# end of file_diff function code