On 30.11.2011 01:02, Graham Leggett wrote:
Hi all,

While merging I am getting a lot of stray svn:mergeinfo changes on arbitrary 
files, for example:

  M      modules/core/mod_watchdog.c
  M      modules/core/mod_so.c
  M      modules/core/Makefile.in
  M      modules/core/config.m4
  M      modules/core/mod_watchdog.dsp
  M      modules/core/mod_watchdog.h
  M      modules/core/mod_so.h

According to various googling[1][2], the solution is to remove the 
svn:mergeinfo property from all files except for the root. Can anyone confirm 
whether this makes sense?

[1] 
http://stackoverflow.com/questions/1496884/subversion-marks-unmodified-files-as-modified
[2] 
http://stackoverflow.com/questions/767418/remove-unnecessary-svnmergeinfo-properties

I talked to Hyrum from the svn project about this. The experience of merging from trunk to a branch differs a bit between the httpd and e.g. the Tomcat project. The commits in the Tomcat project always only produce a single mergeinfo change for the top level directory.

I think the explanation is the following: as soon as you merge not a full revision or commit only part of the merge w.r.t. which files are involved, you get mergeinfo for individual files.

Once you end up having those, each merge will update those mergeinfos, even if the files are not involved at all in the later merges. This leads to the annoying mergeinfo changes in the log mails.

As long as you always merge a full revision and commit the full merged workspace, even including additional changes, you should only end up with one mergeinfo at the top level directory. That's how we do it in Tomcat land.

Now svn 1.7 detects the situation and as I understood Hyrum it will no longer update the mergeinfo for the files that are not part of the merge.

So there are a couple of options:

1) remove the additional mergeinfos except for the top level directory
2) like 1), but also add the missing ones to the top level mergeinfo

In addition:

- always merge and commit completely to avoid the additional
  mergeinfos to reappear

and/or

- upgrade you clients to 1.7 so that even if there are additional
  mergeinfos, merges will only update the ones that are related to
  the actual merge.

Regards,

Rainer

Reply via email to