You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2009/11/12 23:41:34 UTC

Re: svn commit: r40485 - in trunk/subversion: svn tests/cmdline

Hyrum K. Wright wrote:
> Author: hwright
> Date: Thu Nov 12 10:21:32 2009
> New Revision: 40485
> 
> Log:
> Make "svn export $repos/blah '.'" do what you think it would, namely, put a
> file named "blah" into the cwd.
> 
> * subversion/tests/cmdline/export_tests.py
>   (export_to_explicit_cwd): New.
>   (test_list): Run the new test.
> 
> * subversion/svn/export-cmd.c
>   (svn_cl__export): If the explicit TO path is '.', treat it as if it weren't
>     given.

I understand why you did it, but... ugh. Special case. The built-in help
doesn't describe it. "." now behaves differently from
"../name-of-this-dir". Are you sure you really really want this?

- Julian

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

Re: svn commit: r40485 - in trunk/subversion: svn tests/cmdline

Posted by Julian Foad <ju...@btopenworld.com>.
Hyrum K. Wright wrote:
> On Nov 12, 2009, at 5:41 PM, Julian Foad wrote:
> > Hyrum K. Wright wrote:
> >> Make "svn export $repos/blah '.'" do what you think it would, namely, put a
> >> file named "blah" into the cwd.
[...]
> > I understand why you did it, but... ugh. Special case. The built-in help
> > doesn't describe it. "." now behaves differently from
> > "../name-of-this-dir". Are you sure you really really want this?
> 
> I don't know what the current behavior of 'svn export
> $url ../this-dir' is.

julianfoad@edith ~/src/subversion-cyan/tt
$ svn export $SVN_REPOS/trunk/www ../tt
svn: Destination directory exists; please remove the directory or use
--force to overwrite
svn: '../tt' already exists

>   I *do* know that a one-argument export uses the cwd as the export
> target,

Yes.

>  and explicitly supplying the cwd should behave the same as implicitly
> supplying one via the one-argument mechanism.

No. It is explicitly documented as behaving differently depending on
whether you supply a directory argument. Always has been:

[[[
$ svn export --help
export: Create an unversioned copy of a tree.
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.
[...]
]]]

Not, as in most other commands, "If PATH is omitted then '.' is
assumed."

I agree the behaviour is surprising when you encounter it the way you
did, but it's easily understandable when you read the help.

- Julian

> Additionally, poking around the export code has demonstrated a number
> of scenarios where it falls flat on its face.  *sigh*

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

Re: svn commit: r40485 - in trunk/subversion: svn tests/cmdline

Posted by "Hyrum K. Wright" <hy...@hyrumwright.org>.
On Nov 12, 2009, at 5:41 PM, Julian Foad wrote:

> Hyrum K. Wright wrote:
>> Author: hwright
>> Date: Thu Nov 12 10:21:32 2009
>> New Revision: 40485
>> 
>> Log:
>> Make "svn export $repos/blah '.'" do what you think it would, namely, put a
>> file named "blah" into the cwd.
>> 
>> * subversion/tests/cmdline/export_tests.py
>>  (export_to_explicit_cwd): New.
>>  (test_list): Run the new test.
>> 
>> * subversion/svn/export-cmd.c
>>  (svn_cl__export): If the explicit TO path is '.', treat it as if it weren't
>>    given.
> 
> I understand why you did it, but... ugh. Special case. The built-in help
> doesn't describe it. "." now behaves differently from
> "../name-of-this-dir". Are you sure you really really want this?

I don't know what the current behavior of 'svn export $url ../this-dir' is.  I *do* know that a one-argument export uses the cwd as the export target, and explicitly supplying the cwd should behave the same as implicitly supplying one via the one-argument mechanism.

Additionally, poking around the export code has demonstrated a number of scenarios where it falls flat on its face.  *sigh*

-Hyrum

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