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

Re: Making a branch the new trunk

From: Urs Thuermann <urs_at_isnogud.escape.de>
Date: 2006-06-13 12:54:38 CEST

"Gale, David" <David.Gale@Hypertherm.com> writes:

> urs@isnogud.escape.de wrote:
>
> > Also, the reason I wanted to avoid merge and instead use remove and
> > move, is that I thought the log message would state more clearly what
> > has been done. No I get
> >
> > $ svn log -v -r6
> >
> >
> ------------------------------------------------------------------------
> > r6 | urs | 2006-06-09 15:13:01 +0200 (Fri, 09 Jun 2006) | 2 lines
> > Changed paths:
> > M /trunk/a
> > M /trunk/b
> > D /trunk/c
> > A /trunk/d (from /branches/ut/d:5)
> >
> > replace trunk with branch ut.
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > instead of something similar like
> >
> > D /trunk
> > A /trunk (from: /branches/ut:5)
> > D /branches/ut
> >
> > which I would prefer.
>
> With the merge, you're explicitly *not* deleting the trunk and re-adding
> it; you're modifying the contained files, by applying the difference
> between the two sources of the merge. So the first log message is
> correct. (It's also more accurate, since there may well be files that
> don't need to be changed, etc.)

I understand what the merge does. That's not the problem. But when I
abandon the current trunk and replace it by some brnach, I don't think
about this as a "merge" operation but a "replace" operation. Also,
as pointed out in my last mail, when you do a merge you get something
like the following from the log command:

    r6 | urs | 2006-06-09 15:13:01 +0200 (Fri, 09 Jun 2006) | 2 lines
    Changed paths:
       M /trunk/a
       M /trunk/b
       D /trunk/c
       A /trunk/d (from /branches/ut/d:5)
    
    replace trunk with branch ut.

Here, you don't see from the operations (M, D, and A) that after the
commit the content of /trunk is the same as the content of /branches/ut
before the commit. You can see this only in th euser supplied log
message, counting on it being correct. Also, a diff -r5:6 won't show
you that branches/ut:5 and /trunk:6 are the same.

If, however, a "svn rm trunk; svn mv branches/ut trunk" would be
possible in one step (i.e. one commit), and the log would be something
similar to

  D /trunk
  A /trunk (from: /branches/ut:5)
  D /branches/ut

it would be immediately clear, what happened and that trunk is now the
same as branches/ut.

I assume this would also have the nice side effect of requiring less
storage in the repository, because no diffs between branches/ut:5 and
trunk:5 need to stored.

OK, I could do a

   svn rm trunk; svn ci; svn mv branches/ut trunk

Would this have any other negative effect besides having no trunk
temporarily?

urs

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jun 13 12:56:35 2006

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.