[xml/sgml] How to use SVN?

Jay Berkenbilt ejb@ql.org
Wed, 24 Mar 2004 13:29:01 -0500


>   Has some kind of policy regarding the use of the SVN repository
>   been created?  In particular I would like to know how to name a
>   project (xerces packaging) in svn, and how to deal with branches
>   for multiple package versions and so on.

The file /usr/share/doc/svn-buildpackage/PRINCIPLES.gz has a pretty
good discussion of the issues but doesn't address one issue that would
certainly come up with xerces: different upstream versions have to be
maintained separately in separate packages because other packages
depend upon specific incompatible versions.  Would we want to group
the different xerces packages together as in
/xerces/{xerces23,xerces24,xerces25}?

It seems that any svn policy would not have to specify a layout but
would also have to talk about things like use of svn:keywords.  How do
we manage things like $Id:$ substitutions in files when the vendor
files have their own revisions?  It's obviously often useful to be
able to figure out what revision of a file you're looking at
especially when trying to create a good bug report.  (For example, I
generally check upstream repositories before submitting a patch so I
know whether to submit the patch upstream instead or as well.)  Is
there any established practice with CVS for this?  If my reading of
the subversion documentation is correct, subversion does no keyword
expansion by default, and this behavior is controlled by setting the
svn:keywords property.  This should make it easier to handle this with
subversion than CVS.  What happens if you make a modification to an
upstream source file?  Now the upstream revision number is misleading
because you've changed the file.  On the other hand, if you do keyword
substitution in the modified file, you lose the ability to track back
to the original revision in the upstream repository (except through
good use of log messages).  Worse, you could have a situation where
some $Id:$ keywords refer to revisions in one repository and some to
those in another.  (Both CVS and subversion use $Id:$.)  I suppose as
long as keyword substitution is always disabled (which appears to be
the default) in the vendor area, the situation is manageable.

-- 
Jay Berkenbilt <ejb@ql.org>
http://www.ql.org/q/