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

Re: svn copy, branch & mergeinfo

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: Sun, 05 Jul 2009 07:33:33 -0400

Andrea <mariofutire_at_googlemail.com> writes:

[formatting recovered; your lines were > 80 characters]

> 1) I create a branch (e.g. svn copy trunk_at_1234 branches/3.5)
> 2) I merge a bug fix from trunk to branch
>
> Using a client like svn or tortoise I see which revisions have already
> been merged. What I would expect is to see revisions 1-1234 marked as
> been merged.

There isn't mergeinfo because it's part of the natural history. 'svn
log' will show the changesets from 1-1234 that were on the trunk, and
--stop-on-copy will show you where the copy happened.

> So my question is:
>
> should "svn copy" add to the destination a merge info property (in
> this case /trunk:1-1234)?

No, no more than trunk should have self-referential mergeinfo.

> I've tried to manually change the property and it did the job.

Did what job? Let you see something you expected because you didn't
understand at the risk of causing problems due to things you also don't
understand? Sorry to sound harsh, but merge tracking is very tricky
busines; my experience is that it's necessary to be both precise and
careful to avoid trouble.

> I know that if I merge and revision in 1-1234 then nothing happens,
> but still the user would benefit from this extra piece of information.

Besides the risk of confusion from departing from the svn design,
there's a deeper problem: 1-1234 were not in fact merged. They are part
of the history, which is different. Revisions that were merged were
introduced in some later changeset. There isn't mergeinfo on trunk
referring to trunk (this can happen and it's a bug, but there shouldn't
be).

A useful fix would be to make the tool UI more obvious about where a
branch came from. Trac's revision browser does this -- when you look at
the history you see at the end "copied from ...".

I recommend reading these:

  http://blogs.open.collab.net/svn/2008/07/subversion-merg.html

  http://www.collab.net/community/subversion/articles/merge-info.html

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368103

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].

  • application/pgp-signature attachment: stored
Received on 2009-07-05 13:34:43 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.