tags:

views:

56

answers:

2

Background: Before committing a change, I want to compile the old version (without changes) and the new version of the program and compare their output, like this:

svn export -r HEAD . /target/for/old-version
svn export         . /target/for/new-version
... compile and run code in /target/for/old-version
... compile and run code in /target/for/new-version
... compare results

My problem is that 'svn export -r HEAD' accesses the main repository over the network --- which is slow. But SVN keeps the current (unchanged) version on the disk: 'svn cat file' shows the old content of the file without access to the network.

How can I achieve the result of 'svn export -r HEAD' by accessing only data on disk, not via the network?

+4  A: 

You cannot get at the head version, but only at the working copy's base version (the one you updated to last):

  1. Make a copy of your working copy.
  2. Revert in that copy.

You're done.

sbi
Thanks a lot! This is exactly what I wanted.
Yaakov Belch
+1  A: 

svn export -r BASE . /target/for/old-version

I didn't test this not using the network. It shoudln't.

tato
Thanks a lot! That's even better than the previous solution.
Yaakov Belch