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

Re: [rfc]Checkout without the .svn Directories

From: Fraser Campbell <fraser_at_georgetown.wehave.net>
Date: 2004-12-08 12:44:32 CET

On Thursday 02 December 2004 04:18, Anthony Metcalf wrote:

> the "svn" command could then be modified to check if the current tree
> was checked out or exported, and if exported, only allow svn up.

You're basically after a bandwidth/time efficient way of bringing an export up
to date. With a large tree I can see that this would be very useful.

Still, you can do what you want fairly easily already. Export the tree and
record your revision number somewhere. When you want to update do a diff
between your exported revision and head and then apply the patch. These
commands should work on most decent operating systems ;-)

First the checkout:

    shieldaig$ svn export http://svn.wehave.net/svn/fraser/home/.kde
    A .kde
    A .kde/share
    A .kde/share/apps
    A .kde/share/apps/knode
    A .kde/share/apps/knode/nntp.1
    A .kde/share/apps/knode/nntp.1/info
    A .kde/share/apps/kabc
    A .kde/share/apps/kabc/std.vcf
    A .kde/share/apps/konqueror
    A .kde/share/apps/konqueror/bookmarks.xml
    A .kde/share/apps/konqueror/konqueror.rc
    A .kde/share/config
    A .kde/share/config/emaildefaults
    A .kde/share/config/kcontrolrc
    A .kde/share/config/kmailrc
    A .kde/share/config/knoderc
    A .kde/share/config/kcmdisplayrc
    A .kde/share/config/khotkeysrc
    A .kde/share/config/kontactrc
    A .kde/share/config/ksplashrc
    A .kde/share/config/korgacrc
    A .kde/share/config/kickerrc
    A .kde/share/config/kwinrc
    A .kde/share/config/konsolerc
    A .kde/share/config/khotkeys_update
    A .kde/share/config/kdeglobals
    A .kde/share/config/emailidentities
    A .kde/share/config/kdesktoprc
    A .kde/share/config/konquerorrc
    A .kde/share/config/kopeterc
    A .kde/Autostart
    A .kde/Autostart/.directory
    A .kde/Autostart/ssh-add
    Exported revision 1800.

How you record the revision would be up to you. If the export operation is
done frequently then you would want it automated, otherwise I would simply do
"echo 1800 > .exportrev".

Now bringing the tree up to speed:

    shieldaig$ svn diff -r 1800:HEAD \
        http://svn.wehave.net/svn/fraser/home/.kde/ | \
        patch -p0 -d .kde
    patching file share/apps/kabc/std.vcf
    patching file share/apps/konqueror/bookmarks.xml
    patching file share/config/kmailrc
    patching file share/config/kontactrc
    patching file share/config/korgacrc
    patching file share/config/kickerrc
    patching file share/config/kwinrc
    patching file share/config/konsolerc
    patching file share/config/kdeglobals
    patching file share/config/kdesktoprc
    patching file share/config/konquerorrc
    patching file share/config/kopeterc
    patching file Autostart/.directory

diff doesn't tell you the HEAD revision number so you'd have to grab that
yourself in another way and update the .exportrev file. You could write a
wrapper script to automate the whole thing in a few minutes.

-- 
Fraser Campbell <fraser_at_wehave.net>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 8 12:46:56 2004

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.