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

Re: SVN export command irregularity

From: Adam Grant <adam.grant_at_telaeris.com>
Date: Fri, 12 Jun 2009 09:24:01 -0700

Thanks Daniel,

Your explanation makes sense. Going back and re-reading the red-bean docs
shows this:

svn export [-r REV] URL [PATH]

svn export PATH1 PATH2

I didn't realize the [-r REV] only applied to the first case, which does go
to the MASTER repo. I assumed that if I specified `svn export -r HEAD PATH1
PATH2` without giving it a full URL, then it would export from the local,
working copy whatever it thought it's "HEAD" was. And if it didn't export
from the working copy, I expected it to balk when it saw the `-r HEAD`,
since that seems to only apply to export commands if given a URL.

But, checking out the command line, I notice my `svn export --help` says
this (this is what I originally read):
====================
usage: 1. export [-r REV] URL[@PEGREV] [PATH]
       2. export [-r REV] PATH1[@PEGREV] [PATH2]

  1. Exports a clean directory tree from the repository specified by
     URL, at revision REV if it is given, otherwise at HEAD, into
     PATH. If PATH is omitted, the last component of the URL is used
     for the local directory name.

  2. Exports a clean directory tree from the working copy specified by
     PATH1, at revision REV if it is given, otherwise at WORKING, into
     PATH2. If PATH2 is omitted, the last component of the PATH1 is used
     for the local directory name. If REV is not specified, all local
     changes will be preserved. Files not under version control will
     not be copied.
====================

Now this doc leads me to my old train of thought, whereas the red-bean book
disagrees with this. Here they say even if you give it a revision, it will
export from the working copy. But it doesn't. I've tried. It goes to the
repo. Maybe my understanding of subversion isn't that deep, so could it be
if the local working copy doesn't have knowledge of the revision you pass
it, it goes to the MASTER repo, like you suggested, even for HEAD? It seems
screwy to document it like this and then ignore the working copy no matter
which form you use if you tack on `-r REV.

Does it seem like I'm interpreting this correctly?

--
Adam Grant
adam.grant_at_telaeris.com
On Fri, Jun 12, 2009 at 1:20 AM, Daniel Becroft <djcbecroft_at_gmail.com>wrote:
> On Fri, Jun 12, 2009 at 10:37 AM, Adam Grant <adam.grant_at_telaeris.com>wrote:
>
>> Hi everyone,
>>
>> I was wondering why:
>>
>>            `svn export -r HEAD path_to_local_checkout destination`
>>
>> goes to the MASTER repository for the export, whereas:
>>
>>            `svn export path_to_local_checkout destination`
>>
>> exports from the local checkout directory?
>>
>> I did not see this behaviour documented at all, and it really shouldn't be
>> hitting the Master repo if a URL is not specified as the source.
>>
>> Any thoughts or workarounds?
>>
>> Tested on:
>>
>> svn, version 1.5.1 (r32289)
>>    compiled Jul 31 2008, 09:45:17
>>
>> and
>>
>> svn, version 1.6.2 (r37639)
>>    compiled May 16 2009, 05:17:46
>>
>> Thanks.
>>
>> --
>> Adam Grant
>> adam.grant_at_telaeris.com
>>
>>
> Hi,
>
> I'm guessing it's got something to do with the fact that -r HEAD indicates
> the HEAD revision of the repository, which it cannot know without going back
> to the repository.
>
> What are you expecting to be exported with your first command if accessing
> the repository is not allowed?
>
> Cheers,
> Daniel B.
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2361672
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-12 20:34:37 CEST

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