svnmergeinfo

Obsolete entries in svn:mergeinfo


I have obsolete entries in my svn:mergeinfo from are already deleted branches. Is there a way to clean the entries in svn:mergeinfo?


Solution

  • Automatic way? No, there isn't. But you can do it by hand, either using

    svn propdel svn:mergeinfo path/to/dir
    

    if you want to delete the complete mergeinfo, or

    svn propedit svn:mergeinfo path/to/dir
    

    if you want to change just some lines.

    However, I highly recommend that you delete/modify the property only where it really does not make sense. For example, in a typical svn repository layout,

    /
    /trunk
    /tags
    /tags/t1
    /tags/t2...
    /branches
    /branches/b1
    /branches/b2...
    

    the svn:mergeinfo property should only be set on the trunk node and the branch root nodes (i.e. /branches/b1 etc.). If you never merge between anything else but the trunk and the branch root nodes, you can usually safely delete all mergeinfo properties on other files.

    A final note: if the only place where svn:mergeinfo is bothering you is trunk, that stop here and now. It is just too much of a hassle with too little gain :)