[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: --ignore-properties for merge

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 7 Nov 2013 15:16:54 +0100

On Thu, Nov 07, 2013 at 09:43:24AM +0100, Sergei Riaguzov wrote:
> Hi,
> Is there a way to exclude mergeinfo changes from commit? I.e. to use
> --ignore-properties for svn merge in the same way as for svn diff?
> Rationale: imagine a feature branch which is created for implementing just
> one feature. There are many commits with messages like "grrr..." or "wtf"
> or whatever else since this is just a private branch for a feature. There
> are also bunch of merges from trunk back to feature branch.
> Now the feature is done and the branch is to be reintegrated back to trunk.
> It works, however commit contains a lot of property changes of directories
> (mergeinfo). Also files that were added in the branch now have a property,
> saying from were they were added.

Sounds like you're using 1.6 clients. Is that the case?
If so you want to upgrade them all to 1.7 or even better 1.8.
See http://subversion.apache.org/docs/release-notes/1.7.html#subtree-mergeinfo-recording

> The feature branch is to be removed after reintegration and no one is
> supposed to see all those stupid messages. So what I would like to do is to
> create a patch with a difference between branch and trunk and then apply a
> patch to trunk.

Well, this is possible by running the appropriate 'svn diff' command
and saving its output to a file:
e.g. like this: svn diff ^/trunk_at_400 ^/branches/mybranch > branch.diff

Then give the branch.diff file to 'svn patch' (new in Subversion 1.7)
in a working copy of trunk, which is simple: svn patch branch.diff

HOWEVER: There is no support in svn patch for copied things (copies
will show up as additions) and no support for renamed things (i.e you
won't get tree conflicts alerting you of renamed paths). I would
suggest using a reintegrate merge instead (see below).

> Now there will be only one commit and no mergeinfo changes,
> as if there is only one commit for a feature. This is exactly what I want
> but it is not convenient at all because if there will be conflicts you
> won't have a way to postpone them or resolve them.
> What I want to do is being in trunk to say something like:
> svn merge --ignore-properties ^trunk
> It works for diff (svn diff --ignore-properties --old trunk --new branch)
> but there is no such option for merge. Is there a possibility that this
> option can be added in a feature release?

I don't really see a need for such an option, and I don't really
understand where your problem is coming from in the first place.

You're not describing what Subversion commands you are running
for merges. It is possible that you have problems because you're
not using the right commands. How are you running merges exactly?

Have you tried a reintegrate merge of the branch back to trunk?
That creates a single revision in trunk history, which brings in
all changes from the branch. You only see the branch log messages
if you include merged revision in the log output (svn log -g).
So it sounds like what you really want is the standard reintegrate merge.
See http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchemerge.basicmerging.reintegrate
and also http://subversion.apache.org/docs/release-notes/1.8.html#auto-reintegrate
Received on 2013-11-07 15:17:51 CET

This is an archived mail posted to the Subversion Dev mailing list.