31
31
paths.) e.g. the above config examples would match both
32
32
``src/foolib/ChangeLog`` and ``docs/ChangeLog``.
34
The algorithm this implements is very simple: it emits all the entries in OTHER
35
that are new compared to the common base version, followed by all the entries
36
in THIS. The effect of this is to float new entries from the file being merged
37
in to the top of the ChangeLog.
39
e.g. Given a changelog in THIS containing::
45
and a changelog in OTHER containing::
57
This has some limitations:
59
* it makes no effort to detect deletions or modifications to existing entries,
60
and so never conflicts.
61
* it makes no effort to deduplicate entries added by both sides.
62
* the results depend on the choice of the 'base' version, so it might give
63
strange results if there is a criss-cross merge.
34
The algorithm used to merge the changes can be summarised as:
36
* new entries added to the top of OTHER are emitted first
37
* all other additions, deletions and edits from THIS and OTHER are preserved
38
* edits (e.g. to fix typos) at the top of OTHER are hard to distinguish from
39
adding and deleting independent entries; the algorithm tries to guess which
40
based on how similar the old and new entries are.
45
Most changes can be merged, but conflicts are possible if the plugin finds
46
edits at the top of OTHER to entries that have been deleted (or also edited) by
47
THIS. In that case the plugin gives up and bzr's default merge logic will be
50
No effort is made to deduplicate entries added by both sides.
52
The results depend on the choice of the 'base' version, so it might give
53
strange results if there is a criss-cross merge.
66
version_info = (0, 0, 1, 'beta', 1)
56
version_info = (0, 2, 0, 'beta', 1)
68
58
# Put most of the code in a separate module that we lazy-import to keep the
69
59
# overhead of this plugin as minimal as possible.