Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Parse one more patch format correctly. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
4c6f59e2b59dee9f7dd0088a7fa3bfaa |
User & Date: | peter 2017-08-30 10:34:31.965 |
Context
2017-09-05
| ||
10:44 | Zoom window did not size properly with word wrapping. check-in: 257cb373ea user: peter tags: trunk | |
2017-08-30
| ||
10:34 | Parse one more patch format correctly. check-in: 4c6f59e2b5 user: peter tags: trunk | |
2017-06-18
| ||
22:51 | Allow one side of directory diff to be protected from editing. [ff3da54573] check-in: 0095f5a716 user: peter tags: trunk | |
Changes
Changes to src/eskil.tcl.
︙ | ︙ | |||
1169 1170 1171 1172 1173 1174 1175 | insertLine $top 2 "" $sub patch insertLine $top 2 "" $divider patch continue } # A new section in a -u style diff # Normally the chunk starts with @@ # From some tools the chunk starts with ## | | | 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 | insertLine $top 2 "" $sub patch insertLine $top 2 "" $divider patch continue } # A new section in a -u style diff # Normally the chunk starts with @@ # From some tools the chunk starts with ## if {[regexp {^(?:@@|\#\#)\s+-(\d+)(?:,\d+)?\s+\+(\d+)} $line ->\ sub1 sub2]} { if {$state eq "both"} { displayOnePatch $top $leftLines $rightLines \ $leftLine $rightLine } # Look for c function annotation in -u style if {[regexp {^@@.*@@(.*)$} $line -> cfun]} { |
︙ | ︙ |
Changes to tests/patch.test.
︙ | ︙ | |||
164 165 166 167 168 169 170 | procedure TcAddrCalc(PresentAddr : in integer; AccWidth : in DynamicSize_T; } displayPatch gurka set ::_patchfiles(e) } -result {6} | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | procedure TcAddrCalc(PresentAddr : in integer; AccWidth : in DynamicSize_T; } displayPatch gurka set ::_patchfiles(e) } -result {6} test patch-2.1 { Format with # } -body { _PatchInit set ::testpatch [string trim { --- foo.txt 2016-07-10 21:53:36.671932638 -0700 +++ bar.txt 2016-07-10 21:53:54.739860205 -0700 ## -1 +1,2 ## +0 1 ## -5 +8,9 ## +0 1 }] displayPatch gurka concat $_patchfiles(ll) $_patchfiles(rl) } -result {1 5 1 2 8 9} test patch-2.2 { FOrmat with # } -body { _PatchInit set ::testpatch [string trim { --- foo.txt 2016-07-10 21:53:36.671932638 -0700 +++ bar.txt 2016-07-10 21:53:54.739860205 -0700 ## -1 +1 ## +0 1 ## -5 +8 ## +0 1 }] displayPatch gurka concat $_patchfiles(ll) $_patchfiles(rl) } -result {1 5 1 2 8 9} |