开发者

How to 'svn export' the *unchanged* current version without network access?

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 c开发者_运维百科at 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?


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.


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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜