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

RE: Possible subversion bug with svn log?

From: Reedick, Andrew <Andrew.Reedick_at_BellSouth.com>
Date: 2006-08-15 23:46:31 CEST

> -----Original Message-----
> From: Srinivas Kotla [mailto:skotla@broadsoft.com]
>
>
> We noticed that when a new directory with new files is
> added to repository and then subsequently a merge is
> done to a different branch, the log is incomplete.
>
> [skotla@drew trunk]$ svn log -r 57 -v
file:///home/skotla/skrepos/sw/trunk
>
------------------------------------------------------------------------
> r57 | skotla | 2006-08-15 15:36:06 -0400 (Tue, 15 Aug 2006) | 1 line
> Changed paths:
> A /sw/trunk/newdir (from /sw/ws12/newdir:56)
>
> Check svn log after merge of new dir and files
>
------------------------------------------------------------------------

Were you expecting to see new.c and new.h listed in r57? If so, it's
not a bug. When you merge a new directory to a target, you add the
directory object to the target. Since the directory object is really a
tree (containing new.c and new.h), there's no need to explicitly merge
the files in the tree to the target. Adding the root dir of a tree
implicitly adds the subtree.

In unix terms, a directory add in a merge acts like
        'mv branch/newdir trunk/' (but branch/newdir isn't deleted
after the mv)
and not like
        'cp -r branch/newdir trunk/'
which would create brand new copies of newdir, file.h and file.c.

The 'mv' operation involves just one object (newdir). The 'cp -r'
operation touches three objects (a new newdir, file.h and file.c.) 'svn
log' only reports the newdir add for similar reasons as the 'mv'.

This only affects directory adds, which show up in the log with a "(from
...:56)" to indicate that a copy was done. (A subversion copy acts like
a 'mv', not a 'cp -r'.)

The benefit is that newdir contains the original file.c and file.h
objects with their history and attributes intact. If a 'cp -r' merge
was done, new file.c and file.h objects would be created (cloned) with
empty histories (1 log entry) and no attributes.

*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. AL622

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 15 23:48:22 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.