A special feature of svn-buildpackage is so called
mergeWithUpstream mode. Many projects do not want
to keep the whole upstream source under revision control, eg. because
of the large amount of required disc space and process time. Sometimes
it makes sense to keep only the debian/ directory
any maybe few other files under revision control.
The task of exporting the source from repository and adding it to the
upstream source before building becomes annoying after a little time.
But the svn-buildpackage tools automate most of
this work for you by switching to
mergeWithUpstream mode if a special flag has
been detected: the mergeWithUpstream (Subversion) property of the
debian directory. svn-buildpackage
will merge the trunk with upstream source on build time and
svn-upgrade will only update the changed files in
this case.
To enable this feature during the inital import of the source package,
simply add the -o switch to the
svn-inject call and it will prepare the source for
with mergeWithUpstream mode. This reduces
the set of files to those modified for Debian and set the
mergeWithUpstream property.
But what, if you decide to switch to mergeWithUpstream-mode after the
package has been injected? To do this, checkout the whole repository,
remove the files not changed in the Debian package from both upstream
source and Debian branch (svn rm) and set the
mergeWithUpstream property on
debian in the trunk directory
with:
svn propset mergeWithUpstream 1 debian
If you actually decide to stop using the mergeWithUpstream mode, unset the mergeWithUpstream property as follows:
svn propdel mergeWithUpstream debian/
If you don't want to store the upstream sources of all your packages
in the repository, you can pass the --no-branches
switch to svn-inject, which will prevent
svn-inject from creating a branches
subdirectory.