On Sat, Nov 23, 2024 at 10:39 PM Timofei Zhakov <t...@chemodax.net> wrote: > > [...] > > > However, there are some technical limitations in the current merge > > implementation, which prohibit it to be used outside of the merge > > command, but the merge implementation can be split onto two files; the > > merge itself and the "apply" tree-processor. > > > > I have a prototype of factoring-out the "apply" tree-processor from > > merge. In general it seems to be working with most test cases passing. > > Additionally, as you might already have seen, I committed some > > improvements a while ago, which are related to this. > > [...] > > > I am planning to do the following to implement binary patches: > > > > 1. Factor-out "apply" tree-processor from merge.c to another file of > > private client API. > > [...] > > I just created a branch for this in r1922042: branches/apply-processor. > > I am going to move some code from merge.c to merge_processor.c, and then > resolve the issues and fix the tests. > > -- > Timofei Zhakov
Hi again, I was working on this branch for a while. Providing my progress below: - The merge_processor.c file has been factored-out from the merge.c file. - Few adjustments in such things like mergeinfo can be processed through a list of callback functions that invokes back merge.c code from merge_processor.c. - Actions tracking functionality (by this I mean the code that stores the changed, deleted, and conflicted paths) is going to be moved to the notify callback, since it has access to everything required. - I've introduced the possibility to open a "fake" directory for replace operation, but I'll also try an approach, where this directory will be opened when the processor is created. This will get us rid of having to check the parent baton for NULL on each access, since we will always have it created, either by dir_opened() or virtually by svn_client__apply_processor_create(). - Most of the tests are passing. There is only one test failing, and for now I have no idea of what's going on there [1]. I'll look at it soon. - Additionally, I made a few tests on this separated "apply" processor, which copies the changes from one WC to another through it. I'll tell you more about it later. [1]: https://github.com/apache/subversion/actions/runs/12052015541/job/33604380050#step:8:394: [[[ FAIL: merge_tests.py 129: merge with added subtrees with mergeinfo ]]] -- Timofei Zhakov