[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How to avoid cluttering the svn repository with several versions of compiled files

From: David Weintraub <qazwart_at_gmail.com>
Date: Wed, 13 May 2009 12:19:00 -0400

Don't bother putting the built items into Subversion. You can't easily
remove revisions of files once they're in the Subversion repository.
Thus, binary builds can clutter up the Subversion repository and
greatly increase the amount of diskspace you need.

Instead, setup a non-Subversion release repository where people can
pull off these built versions.

We use Nexus as our release repository <http://nexus.sonatype.org/>.
Nexus is a Maven repository manager, but it works fine with non-Maven
projects as well. We put all of our releases from both Maven and
non-Maven project in our Nexus repository. This gives you the ability
to version your binary files while not clogging up your Subversion
repository with obsolete files. You can easily delete obsolete
revisions in Nexus, but not if you put them into Subversion.

If you have a non-Maven project, and you want to automatically add the
built revisions into your Nexus repository, you can use a shell script
like this one:

#! /usr/bin/ksh
# deploy.sh
########################################################################

########################################################################
# Name: David Weintraub
# Purpose: To deploy all files in the api-lib directory to our Maven
# repository.
#
########################################################################

########################################################################
# CONSTANTS
#
deployDir="_build/tmp/api-lib"
archiveDir="_build/archive"
#
########################################################################

########################################################################
# FIND CURRENT DIRECTORY
#
programName=$0 #Includes Directory
dirName=$(dirname $0) #Directory Executed
if [ -z "$dirName" ]
then
    dirName=`pwd` #Current Working Directory
fi

deployDir="$dirName/$deployDir" #Prepend Directory Name
archiveDir="$dirName/$archiveDir"
#
########################################################################

########################################################################
# FIND REVISION NUMBER
#
if [ "$1" ]
then
    version="$1"
else
    version="5.3"
fi
#
########################################################################

########################################################################
# LOOP THROUGH EACH FILE IN THE DEPLOYMENT DIRECTORY
for file in ${deployDir}/*
do
#
# ####Strip the Name of the directory and suffix from the file
#
    fileName=$(basename $file .jar)

#
# ####Deploy to Maven Repository
# ####NOTE: You need to setup the repository and accounts in
~/.m2/settings.xml file
#
    mvn deploy:deploy-file \
        -DrepositoryId="snapshot" \
        -Durl="http://aladdin.solbright.com:8082/nexus/content/repositories/snapshots/"
\
        -Dfile="$file" \
        -DgroupId="com.solbright" \
        -DartifactId="$fileName" \
        -Dversion="$version-SNAPSHOT" \
        -Dpackaging="jar"\
        -DgeneratePom="true" \
        -DuniqueVersion="false"
done
#
# END OF PROGRAM
########################################################################

On Wed, May 13, 2009 at 7:26 AM, Dymetman, Marc
<Marc.Dymetman_at_xrce.xerox.com> wrote:
> Hi, I am a newbie to SVN, and have the following question:
>
>
>
> Suppose that I am collaborating with several people on producing a book
> using LaTeX.
>
> I would like to use SVN not only for versioning the sources, but also I
> would like to have in the repository an up-to-date version of the .pdf (or
> .dvi, or .ps) compiled from these sources. The reason for that is that,
> although the pdf is recoverable from the sources, it is convenient for
> everybody to see the latest version without having to recompile the sources.
>
> I could compile the pdf in my working copy, and add it to the svn
> repository, but then I would be cluttering the repository with many versions
> of the pdf (for which SVN is probably not doing a good job at incremental
> diffs).
>
>
>
> Is there a way to tell SVN that the latest pdf file should *replace* the
> previous one, that is, to force deletion of the previous revisions of that
> file?
>
> Of course I could save the pdf file somewhere else, not under version
> control, but perhaps there is a way to do that inside svn?
>
> (I guess my question would also make sense for binaries compiled from
> programs, not only for Latex docs).
>
>
>
> - Marc

-- 
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2239828
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-13 18:21:26 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.