Hi All,
I am working in a team to customize Trac
(http://www.edgewall.com/trac/), a lightweight project management
tool, for academic use. As part of developing a testing framework for
the project, I am trying to create a mock Subversion repository object
that would be able to replace the "real" subversion for the purposes
of testing. While working on this, I noticed some inconsistency in the
way subversion handles base revisions during move operations -- this
most probably means that I haven't fully understood the way subversion
works; hence this query.
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.
I need to get the base revisions for each node correct for my
implementation of a correct mock repository object. I'm unsure how
subversion works underneath, and how it decides the base revision for
nodes at each revision, and when a MOVE is treated as a DELETE
followed by an ADD and vice-versa. I am hoping someone can fill me in.
Thanks much,
Sukhmeet Toor
Argon Project
http://www.third-bit.com/trac/argon/
p.s. a dump of the test repository is attached.
"svn log -v" output follows:
==================
------------------------------------------------------------------------
r12 | stoor | 2005-06-27 11:19:31 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
D /dir2/newdir
------------------------------------------------------------------------
r11 | stoor | 2005-06-27 11:19:30 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
M /dir2/cool/b.txt
------------------------------------------------------------------------
r10 | stoor | 2005-06-27 11:19:28 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
A /dir2/cool (from /dir2/newdir:9)
------------------------------------------------------------------------
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
* /newdir moved to /dir2/newdir -- D followed by A
* base revision for /newdir is 8 -- should have been 4
------------------------------------------------------------------------
r8 | stoor | 2005-06-27 11:19:24 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
D /dir2/f.txt
A /dir2/g.txt (from /dir2/f.txt:7)
* /dir2/f.txt moved to /dir2/g.txt -- A followed by D
------------------------------------------------------------------------
r7 | stoor | 2005-06-27 11:19:23 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
M /d.txt
A /dir2/f.txt
------------------------------------------------------------------------
r6 | stoor | 2005-06-27 11:19:22 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
A /dir2
------------------------------------------------------------------------
r5 | stoor | 2005-06-27 11:19:21 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
A /d.txt
A /e.txt
------------------------------------------------------------------------
r4 | stoor | 2005-06-27 11:19:20 -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)
* /dir moved to /newdir -- A followed by D
* base revision of /dir is 1
------------------------------------------------------------------------
r3 | stoor | 2005-06-27 11:19:18 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
A /dir/c.txt (from /a.txt:2)
------------------------------------------------------------------------
r2 | stoor | 2005-06-27 11:19:17 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
M /a.txt
A /dir/b.txt
------------------------------------------------------------------------
r1 | stoor | 2005-06-27 11:19:16 -0400 (Mon, 27 Jun 2005) | 1 line
Changed paths:
A /a.txt
A /dir
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 27 18:25:24 2005