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

Re: Subversion produces inconsistent base revisions for move operations

From: Sukhmeet Toor <toorsukhmeet_at_gmail.com>
Date: 2005-06-27 20:00:25 CEST

Hi Dale

Thanks for a quick response; I understand that when something is
moved/copied, it gets copied from a specific revision for a specific
path. But, the issue is how subversion decides which revision to copy
from. In the case specified, /dir2/newdir@9 was copied from /newdir@8
(not @4 -- even if they're the same). Now compare this with r4 below.
Here, /newdir@4 was copied from /dir@1 (and not from /dir@3) as we
would have expected since the WC was at 3.

------------------------------------------------------------------------
r4 | stoor | 2005-06-27 12:16:05 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
   D /a.txt
   D /dir
   A /newdir (from /dir:1)
   A /newdir/b.txt (from /dir/b.txt:3)
   A /newdir/c.txt (from /dir/c.txt:3)

------------------------------------------------------------------------

This is the problem that I'm facing. My objective here is only to read
a repository and generate the changesets for each revision
appropriately. So, my concern is not how to make /dir2/newdir@9 copy
from /newdir@4, but to understand which revisions are selected when
nodes are copied, so I can code some similar logic for my mock object.
Any other ideas?

Thanks again,
Sukhmeet

On 6/27/05, Dale Worley <dworley@pingtel.com> wrote:
> > From: Sukhmeet Toor [mailto:toorsukhmeet@gmail.com]
> >
> > Below is the output of a "svn log -v" issued at the top level of the
> > working copy of my test repository (my comments are indicated with *'s
> > below). Notice first that some moves are treated as a DELETE followed
> > by an ADD (r9), while some are treated as an ADD followed by a DELETE
> > (r4 and r8). The problem that I'm facing is that in r9, the base
> > revision for newdir is 8 while it should have been 4, as it was last
> > modified in revision 4 (moved from /dir). Now, my guess is that in
> > this case the DELETE happened before the ADD (and not in the reverse
> > order), and hence the base revision of /newdir got touched up to 8.
>
> Any time something is copied in the repository (and I assume, when something
> is moved), it is always copied from some specific revision of some specific
> path. in this case:
>
> ------------------------------------------------------------------------
> r9 | stoor | 2005-06-27 11:19:26 -0400 (Mon, 27 Jun 2005) | 1 line
> Changed paths:
> A /dir2/newdir (from /newdir:8)
> D /newdir
>
> /dir2/newdir@9 is copied from /newdir@8. Of course, /newdir@8 is the same
> as /newdir@4, but Subversion doesn't record that information at that moment.
> But this is what you expect if you have a WC at rev 8, do "svn mv /newdir
> /dir2/newdir", and commit -- /newdir in your WC was at rev 8.
>
> You could get the effect your are looking for my something grotty like "svn
> delete /newdir ; svn copy -r4 http://.../newdir /dir2/newdir", but why do
> you want to?
>
> Dale
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 27 20:03:49 2005

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

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