Hi Stefan^2,

Hi Stefan,

If you have a working build environment for Subversion,
you might have a look at this branch:

https://svn.apache.org/repos/asf/subversion/branches/svn-mergeinfo-normalizer

It provides a new tool that you might find useful:

./tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer

which allows you to analyse and reduce the mergeinfo in a working copy.
It also tells you which mergeinfo cannot be elided and _why_.

svn-mergeinfo-normalizer analyse /path/to/working/copy
svn-mergeinfo-normalizer normalize /path/to/working/copy
svn-mergeinfo-normalizer analyse /path/to/working/copy
svn-mergeinfo-normalizer clear-obsoletes /path/to/working/copy
svn-mergeinfo-normalizer analyse /path/to/working/copy
svn-mergeinfo-normalizer combine-ranges /path/to/working/copy
svn-mergeinfo-normalizer analyse /path/to/working/copy

CAVEAT: This tool has not been reviewed and thoroughly tested.
You should only commit changes that you have verified to be correct.

Please let us know what your results were.
[...]

I gave the normalizer a first run and using it I was able to reduce our record of mergeinfos quite significantly without too much manual work. So alltogether I'd consider this a really useful tool. I sent you the logs per PM so you can take a look at all the details yourself (some of the information contained in the logs I do not want to make publicly available on the mailing list and it's quite some large logs (several MB)).

Note that running normalize at the beginning, could not remove any redundant mergeinfos at all, since there were always some revisions missing. However running the following sequence of commands first:
1. clear-obsoletes
2. combine-ranges
3. normalize

Then was able to remove a significant amount of redundant mergeinfos (eliminating mergeinfos on over 100 files).

There were still some remaining records. These I managed to get rid of by manually merging the missing ranges.

One remaining case which couldn't be normalized automatically was on "/src/version_generator". Revision 190854 was recorded on root and on src but not on src/version_generator.
190854 was actually the creation of a branch (XRebirth/branches/XR_ogl).
So I guess (in theory) the normalizer could have handled that missing range as an irrelevant revision for eliding the remaining branches. Wouldn't it be possible/useful to handle that by the tool automatically?

Regarding your other questions I'll get back to you later.

Regards,
Stefan
===============================================
=== normalizer analyse output to start with ===
===============================================

Scanning working copy E:/[projects]/XR/clean_source_branch ...
    Found mergeinfo on 25 nodes.
    Found 127 branch entries.
    Found 627 merged revision ranges.

Fetching log for http://192.168.3.2:8055/svn/Egosoft ...
    Received 197188 revisions from 1 to 197188.
    Received 1007890 path changes.
    Pool has 313350 different paths.

Trying to elide mergeinfo from path
    E:/[projects]/XR/clean_source_branch/src/version_generator
    into mergeinfo at path
    E:/[projects]/XR/clean_source_branch/src

    All branches still exist in HEAD.

    Try to elide remaining branches:
    elide redundant branch 
/XRebirth/branches/XR_WareExchange/src/version_generator
    CANNOT elide branch /XRebirth/branches/XR_ogl/src/version_generator
        revisions missing in sub-node: 190854

    Sub-tree merge info cannot be elided due to the following branches:
    /XRebirth/branches/XR_ogl/src/version_generator

[...]

wc "src/version_generator" mergeinfos:
/XRebirth/branches/XR_WareExchange/src/version_generator:187945-188311
/XRebirth/branches/XR_ogl/src/version_generator:191490-191806,192621-192868

wc "src" mergeinfos:
/XRebirth/branches/MartinWork/src:178512-178577
/XRebirth/branches/P1_Network/src:190971,190973-190974,191130,191132,191156,191261,191329,191337-191342,191346-191347,191355-191357,191360,191567,191588-191589
/XRebirth/branches/XR_WareExchange/src:187945-188311
/XRebirth/branches/XR_ogl/src:190854-191862,192079-192962,193050-193076
/XRebirth/branches/XR_porting/src:193170,193174,193195-193201,193215,193217-193218,193222-193228,193230-193231,193240-193264,193269,193273-193274,193285,193288,193293-193294,193299,193308,193316,193319-193321,193323-193354,193356,193362-193366,193368,193372,193376-193378,193380,193382-193383,193391,193393-193395,193399-193400,193402-193405,193416,193419,193421,193424-193434,193452-193455,193459,193473,193475,193477-193478,193495,193525,193541,193553-193557,193559-193565,193581,193583,193601-193607,193616-193621,193636,193723-193780,193790-193799,193801-193802,193819-193821,193825-193855,193857-193863,193869-193889,193898,193902,193908-193910,193917-193970,193994,193996-193999,194005-194006,194015,194089,194127-194128,194206,194224,194254,194296-194303,194330,194349,194376,194616-194617,194976-194977,195014,195029,195268,195301-195302,195335,195344-195346,195695-195701,195716-195729,195862-195909,195911-195912
/XRebirth/branches/performance:179033,179037,179048,179054,179081-179082,179137,179166-179167,179192
/XRebirth/branches/performance/src:179671,179674-179675,179684,179811-179812,179911
/XRebirth/trunk/src:184285-184292,185598,185627,185652-185660,185697,185709,185931,189730-189746,191090,191096,191235,191239-191241,191397,191459,191461-191464,191467-191470,191615,191647,191655,191717-191718,191746,191792-191795,193446,193745,193849,194233,194280,194678,194846-194848,194867,194878,195075,195079,195118-195123,195480,195483,195517,195601,195629,195699,195733,195741,195745-195746,195748-195749,195791,195793-195794,195797,195821-195823,195827,195890,195930-195932,195935-195941,195963-195967,195974-196006

=============================================================================================================================================================
=== 190854 on /XRebirth/branches/XR_ogl/src/version_generator: was creating the 
XR_ogl branch (aka: could be considered irrelevant aka merged implicitly) ===
=============================================================================================================================================================

=========================================================
==== after merging 190854 into src/version_generator ====
=========================================================

Scanning working copy E:/[projects]/XR/clean_source_branch ...
    Found mergeinfo on 25 nodes.
    Found 127 branch entries.
    Found 628 merged revision ranges.

Fetching log for http://192.168.3.2:8055/svn/Egosoft ...
    Received 197189 revisions from 1 to 197189.
    Received 1007891 path changes.
    Pool has 313350 different paths.

Trying to elide mergeinfo from path
    E:/[projects]/XR/clean_source_branch/src/version_generator
    into mergeinfo at path
    E:/[projects]/XR/clean_source_branch/src

    All branches still exist in HEAD.

    Try to elide remaining branches:
    elide redundant branch 
/XRebirth/branches/XR_WareExchange/src/version_generator
    elide branch /XRebirth/branches/XR_ogl/src/version_generator
        revisions inoperative in sub-node: 
190855-191489,191807-191862,192079-192620,192869-192962,193050-193076

    All sub-tree mergeinfo can be elided.

Reply via email to