Comments to checkoutsvn.sh
mateusz at loskot.net
Wed Aug 9 16:01:35 EDT 2006
Today, I decided to re-structure my working copies of FDO components
according to BuildFDOOpenSource.pdf (July 2006) document. So, I decided
to use checkoutsvn.sh script. I used this script to download fdocore and
fdordbms components. Everything works well.
Although, I'd have some comments to checkoutsvn.sh.
The FDO build manual says:
"NOTE The fdocore components includes a script called checkoutsvn.sh,
which can be used to get updates for the all of the components from the
Here I see first inaccuracy. The manual says this script is to "get
updates" but actually it just downloads files from repository, *once*.
So this script should be used *only* at the beginning of user's
adventure with FDO, to initially download FDO components.
On page 33 in chpater "Updating the Source" the manual says again about
using checkoutsvn.sh to update sources:
"You can update all of the source by running the checkoutsvn.shscript in
the build directory."
That's again not correct.
Later, on page 45 manual says:
"If you notice a third-party component has been updated during a run of
checkoutsvn.sh, you must run this script again"
Where is the problem?
checkoutsvn.sh script calls "svn checkout" command and it does not
call "svn update" anywhere.
svn checkout command should be used only to check out a working copy
from a repository. This command is not intended to "bring changes from
the repository into your working copy." 
The problem is that svn checkout command will not merge repository
changes with local copy, with new changes or without.
Simply case study:
1. Users A and B did clean checkout from 'fdocore' repository.
2. User A has applied changes to fdocore/trunk/Makefile.am file but
without committing (work is in progress)
3. User B has also applied new changes to fdocore/trunk/Makefile.am but
he committed them back to the repository.
4. Now, user A runs checkoutsvn.sh to merge changes from repository, for
example before he will commit back his new changes.
checkoutsvn.sh runs "svn checkout" command so user A will get
*conflict*, even if changes from user B are made in different lines of
But if user A run "svn update" command, then he would get correctly
merged file, without any conflicts.
This fact is due to lack of proper merging support in "svn checkout",
becaues "svn checkout" is dedicated to be launched once to get clean
copy of repository.
So, my concerns are that the FDO building manual is inaccurate saying
checkoutsvn.sh can be used to update sources.
Second, I'd like to propose to create new script called updatesvn.sh
that will do similar job but calling svn update.
Separate scripts will be good to indicate users explicitly with what
they are doing actually.
More information about the Fdo-internals