This page is about making the "svn mergeinfo" command give a useful and user-friendly summary of the state of merging between two specified branches.
Tracked in issue #4239 "'svn mergeinfo' should show a user-friendly summary".
Compared with the 1.7 “svn mergeinfo” command, we need to:
- print output in a digestible, user-friendly form, instead of just a list of revnums;
- indicate the meaning and not just raw data: for example, indicate whether the target is fully caught up or not;
- report something meaningful about subtree merges (in 1.7 this command doesn’t even notice them by default);
- check that you specified a sensible source branch (1.7 simply says nothing if you accidentally specified the target branch as the source branch).
Mark Phippard said, and I agree with this: "It will be interesting to see if you can show both eligible and merged information at the same time in a way that is understandable. I think if the command can show some things like there the branch came from, or the other path that the branch is merging with, could be useful new information. Sort of like svn info for a branch. I think it makes sense to highly condense the revisions as they are never going to add a lot of value in this kind of context."
Current Goals
- Human-readable summary in the form of an ASCII-art graph
- No machine-readable output; consider adding it (--xml?) in future – issue #4245 "svn mergeinfo --xml".
Examples
Error Conditions
- When the source and target are not related:
$ svn mergeinfo ^/branches/A/sub/dir ^/branches/B svn: E205000: Source and target must be different but related branches svn: E205000: Source and target have no common ancestor: 'https://.../branches/A/sub/dir@head' and 'https://.../branches/B@head'
Subtree Mergeinfo
Mergeinfo should be depth-infinity ("recursive") by default, reporting any sub-tree differences, where presently it does not.
How should the output look in the presence of subtree merges?
$ svn mergeinfo ...
Functional & UI Changes
Where |
Requirement or Change |
Effort |
Status |
svn mergeinfo |
Bail out if source & target are not different and related branches. |
|
Done |
svn mergeinfo |
Display a summary when no "--show-revs=" option (any sort of summary). |
|
Done |
summary |
Summary in the form of a diagram (graph). |
|
Done |
summary |
Show common origin of branches. |
|
Done |
summary |
Show latest full merge (revnum and direction). Initially, this only shows the "from" revnum; showing the "to" revnum is a separate requirement. |
|
Done |
summary |
Show latest full merge in the other direction as well. Should be straightforward to extend the find_symmetric_merge set of functions to report both "base on source" and "base on target", and use them to mark the beginning of the two merge arrows. Of course, omit the arrow if there was no merge. |
day |
|
summary |
Show the revnum of the "to" end of each merge arrow, as well as the "from" end. This info is not so easy to obtain. The find_reintegrate_merge set of functions will need to scan the branch history for mergeinfo changes and find the first revision in which all the source revs |
week |
|
summary |
Show cherry-picks: shows whether there are any cherry-picks, in each direction, since the last full merge in the respective direction; and if so, indicates their revision number range(s) compactly. |
week |
|
summary |
Given a WC target, notice local mods (uncommitted merginfo). |
day |
|
summary |
Indicate whether subtree info is being shown: at least, indicate if there might be relevant subtree mergeinfo that is not shown. |
week |
|
summary |
Show subtree info when depth > empty. |
month |
|
summary |
Abbreviate the branch path to just the branch name, somehow, and/or rearrange layout moving it to a separate line, so that a moderately long branch name does not overflow 80 columns. |
day |
|
summary |
Indicate how many changes there are on each branch since the last merge. This would help a user to confirm what they're expecting, and/or evaluate whether a branch is in need of a catch-up merge. |
days? |
|
summary |
Show the last changed revision on each branch (in addition to the head or specified tip revision, probably). |
day |
|
--show-revs |
Show-revs mode with depth=infinity understandable & documented (in help). |
week? |
|
|
|
|
|
Questions
...