[sldev] New source snapshots - on SVN
Dale Glass
dale at daleglass.net
Wed Mar 21 03:28:07 PDT 2007
В сообщении от 21 марта 2007 09:08 Dzonatas написал(a):
> Added to the repository:
How do you import these?
Importing new source into SVN is easy (svn_load_dirs say). The problem
is that this method misses renames unless you actually take care of
that.
And even then you will miss the case where file foo.c is in revision
1, deleted from revision 2, then restored back in revision 3. This
leads to a particularly annoying problem:
Revision 1:
foo.c exists.
Programmer checks out revision 1, starts working.
Vendor releases revision 2, which deletes foo.c, then revision 3,
which puts it back.
Programmer imports both into /vendor using svn_load_dirs, which
doesn't know the history of foo.c, so it does a svn delete for it in
r2, and a svn add in r3. Now we have:
/trunk
/vendor/r1
/vendor/r2
/vendor/r3
Now, programmer decides to skip r2 completely and update to r3
directly, and does:
svn merge http://example.com/proj/vendor/r1
http://example.com/proj/vendor/r3 trunk
This would merge the differences between vendor's r1 and r3 into
trunk.
At this point, the commit will fail. This is is because trunk/foo.c
and vendor/r3/foo.c are internally different files, and don't share
an ancestry. Now merging requires using the --ignore-ancestry flag to
perform the merge.
Additionally, you can't see the history of vendor/r3/foo.c, because
there isn't any: This is a new file for SVN, unrelated to its
previous version in r1.
My guess about why this error happens: In a merge
without --ignore-ancestry, SVN wants to "link" foo.c to vendor/r3
version, but then it turns out that there's no history leading back
to the version in trunk, so it fails.
This is one reason why I REALLY want a LL repository.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070321/ea9222a6/attachment-0001.pgp
More information about the SLDev
mailing list