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

RE: SVN bug? exporting HEAD or numbered revision appears toadd/copy

From: Rob Hubbard <rob.hubbard_at_softel.co.uk>
Date: Thu, 23 Jul 2009 13:26:37 +0100

Hello Stefan,

thanks for the reply

> > the following appears to be a bug in SVN:
> > when exporting from the HEAD revision, SVN appears to be
> adding a file
> > (as if the command was a copy rather than an export)
> >
> > C:\my_project> svn export -rHEAD file.txt file.head.txt
> > A file.head.txt
> > Export complete.
>
> You're not using export as it is meant to be used.
> You should not be exporting things into a working copy.
> Export to a new empty, unversioned directory instead.
>
> What problem are you trying to solve by exporting the file into
> a working copy? Maybe if you explain this to us we will be able
> to show you a better way of solving that problem.

I'm not trying to solve a problem as such. I simply wanted a local
unversioned copy of the latest version of a file in the repository.
(This was to allow me to use the GUI compare tool WinMerge on a machine
on which I can't install a TortoiseSVN client.)

The reason for the posting was simply because the behaviour of export
surprised me. On further thought, I realise that it's not actually
wrong: svn export is intended to behave much like svn checkout but
without creating the .svn directories.

Because my target directory happened to be a working copy (which is, as
you indicated, abnormal usage), I misread SVN's response.

I wonder whether svn export should say 'E' (for export) or 'X' or '?'
(for unversioned) rather than 'A' (for added). That would be less
surprising, perhaps.

Of course, I could have just used
        svn cat -rHEAD file.txt > file.head.txt
instead.

If I wanted a versioned copy added to my working copy, I would of course
just use something like
        svn copy -rHEAD file.txt file2.txt

Thanks for your attempt to help with what was basically user error.
Sorry for the noise.

Rob.

________________________________________________________________
This message has been independently scanned for the Softel Group and cleared of containing viruses and other malicious data.

Powering Television Beyond the Video (TM)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2374796

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-23 14:27:32 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.