Commit ed30630
committed
Implement a patch file parser in libsvn_diff's level that consumes an
apr_file_t as its source instead of a local_abspath, used in the
svn_patch_file_t interface.
The completely new abstraction is mandatory, because the existing one
(svn_patch_file_t) implements open and close methods which also close
the file, however, if we want to pass it the top, close method will still
affect the file.
The newly introduced in this commit interface (svn_diff_patch_parser_t) can be
initialised from a APR file pointer using the svn_diff_patch_parser_create()
function and used in svn_diff_patch_parser_next().
To maintain svn_patch_file_t related behaviour and prevent code duplication,
it is made up to simply wrap the svn_diff_patch_parser_t interface.
* subversion/include/svn_diff.h
(svn_diff_patch_parser_t,
svn_diff_patch_parser_create,
svn_diff_patch_parser_next): Declare symbols.
* subversion/libsvn_diff/parse-diff.c
(svn_diff_patch_parser_t): Implement structure.
(svn_diff_patch_parser_create,
svn_diff_patch_parser_next): Implement functions.
(svn_patch_file_t): Replace internal parser information with reference to
a patch parser; Move to bottom group.
(svn_diff_open_patch_file): Correctly create the structure and its new
field; Move to bottom group.
(svn_diff_parse_next_patch): Implement trough svn_diff_patch_parser_next()
git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1925462 13f79535-47bb-0310-9956-ffa450edef681 parent 54e2d89 commit ed30630
2 files changed
Lines changed: 114 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1370 | 1370 | | |
1371 | 1371 | | |
1372 | 1372 | | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1373 | 1412 | | |
1374 | 1413 | | |
1375 | 1414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1947 | 1947 | | |
1948 | 1948 | | |
1949 | 1949 | | |
1950 | | - | |
1951 | | - | |
1952 | | - | |
1953 | | - | |
1954 | | - | |
1955 | | - | |
1956 | | - | |
1957 | | - | |
1958 | | - | |
1959 | | - | |
1960 | | - | |
1961 | | - | |
1962 | | - | |
1963 | | - | |
1964 | | - | |
1965 | | - | |
1966 | | - | |
1967 | | - | |
1968 | | - | |
1969 | | - | |
1970 | | - | |
1971 | | - | |
1972 | | - | |
1973 | | - | |
1974 | | - | |
1975 | | - | |
1976 | 1950 | | |
1977 | 1951 | | |
1978 | 1952 | | |
| |||
2192 | 2166 | | |
2193 | 2167 | | |
2194 | 2168 | | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
2195 | 2194 | | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
2199 | | - | |
2200 | | - | |
2201 | | - | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
2202 | 2201 | | |
2203 | 2202 | | |
2204 | 2203 | | |
| |||
2370 | 2369 | | |
2371 | 2370 | | |
2372 | 2371 | | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
2373 | 2416 | | |
2374 | 2417 | | |
2375 | 2418 | | |
| |||
0 commit comments