Lev Serebryakov wrote:
> And simple example.
>
> Here are repository with two files: file1.c & file2.c
> Symbols in these files are:
>
> file1.c:
> REL1:1.1
> REL2:1.3
> BRANCH1:1.3.0.2
>
> file1.c:
Guess you mean file2.c.
> REL1:1.2
> REL2:1.4
> BRANCH1:1.5.0.2
>
> If script sees only `file1.c' it "thinks":
>
> (1) REL1 is tag on TRUNK, we copy TRUNK to create it
> (2) REL2 is tag on TRUNK OR BRANCH1 before file was changed on this
> branch. WHAT SHOULD WE COPY!? BRANCH1 and TRUNK contains SAME
> file in this moment of time!
I'd say REL2 is a tag on TRUNK, since its version only has two
components. A tag on BRANCH1 would have a version number 1.3.2.x.
If I converted this repository (consisting of only file1.c) to svn, I'd
expect to see something like this:
rev 1: A /trunk/file1.c (1.1)
rev 2: M /trunk/file1.c (1.2)
rev 3: M /trunk/file1.c (1.3)
rev 4: A /branches/BRANCH1 by copying /trunk@3
rev 5: A /tags/REL1 by copying /trunk@1
Look for a copy source with file1 (1.3):
Alternative 1:
rev 6: A /tags/REL2 by copying /trunk@3
Alternative 2:
rev 6: A /tags/REL2 by copying /branch/BRANCH1@4
Either way would be fine, since we have equivalent history recordings in
both cases, and all directories have the correct version of
file1.c@HEAD. First alternative would be simpler, but that's an
optimization.
> If script sees BOTH files, it "thinks"
>
> (1) REL1 is tag on TRUNK in BOTH files, we copy TRUNK to create it.
> (2) REL2 is tag on TRUNK OR BRANCH1 in file1.c
> REL2 is tag on TRUNK in file2.c
> HERE IS NO CONFLICT: TRUNK is PROPER parent for this tag, copy
> it!
For a repository with both files, it might read:
rev 1: A /trunk/file1.c (1.1)
A /trunk/file2.c (1.1)
rev 2: M /trunk/file2.c (1.2)
rev 3: M /trunk/file1.c (1.2)
M /trunk/file2.c (1.3)
rev 4: M /trunk/file1.c (1.3)
M /trunk/file2.c (1.4)
rev 5: M /trunk/file2.c (1.5)
rev 6: A /branches/BRANCH1 by copying /trunk@5
rev 7: A /tags/REL1 by copying /trunk@2
Look for a copy source with revisions file1(1.3) file2(1.4):
rev 8: A /tags/REL2 by copying /trunk@4
All directories have correct history and contain the right versions of
each file @HEAD.
Now, if instead file2.c would have contained:
file2.c:
REL1:1.2
BRANCH1:1.5.0.2
REL2:1.5.2.2
rev 1: A /trunk/file1.c (1.1)
A /trunk/file2.c (1.1)
rev 2: M /trunk/file2.c (1.2)
rev 3: M /trunk/file1.c (1.2)
M /trunk/file2.c (1.3)
rev 4: M /trunk/file1.c (1.3)
M /trunk/file2.c (1.4)
rev 5: M /trunk/file2.c (1.5)
At this point we look for a copy source with revisions file1 (1.3) and
file2 (1.5).
rev 6: A /branches/BRANCH1 by copying /trunk@5
rev 7: M /branches/BRANCH1/file2.c (1.5.2.1)
rev 8: M /branches/BRANCH1/file2.c (1.5.2.2)
rev 9: A /tags/REL1 by copying /trunk@2
At this point, it should look for a copy source with revisions file1
(1.3) file2 (1.5.2.2):
rev 10: A /tags/REL2 by copying /branches/BRANCH1@8
All directories have correct history and the contain right versions of
each file @HEAD.
--
Lev, it would be really interesting if you could extend this example in
such a way that the choices in the first walkthrough would not be
equivalent. That could maybe help to illustrate your point.
Mats
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 13 12:45:05 2003