[[[
Fix svncopy.pl to behave more like URL -> URL svn copy.
Unlike svn copy, svncopy.pl always added the source directory as a
child of the destination, even with a single source, and even if the
destination didn't exist. This change makes svncopy.pl behave like a
URL -> URL svn copy: if called with a single source and the
destination doesn't exist, the source is copied directly to the
destination.
* contrib/client-side/svncopy/svncopy.pl.in
If we have a single source, copy it directly to the destination
to avoid creating an extra subdirectory under the destination.
* contrib/client-side/svncopy/svncopy.README
Update README to show that extra subdirectory is no longer created.
Fix example that showed svn copy creating an extra subdirectory.
* contrib/client-side/svncopy/testsvncopy.pl.in
Update tests to reflect new behaviour.
]]]
Given the following repository structure:
$REPOS/
|-- tags/
`-- trunk/
`-- foo.c
Running "svn copy $REPOS/trunk $REPOS/tags/version_1" results in:
$REPOS/
|-- tags/
| `-- version_1
| `-- foo.c
`-- trunk/
`-- foo.c
However, "svncopy.pl $REPOS/trunk $REPOS/tags/version_1" gave us an
extra "trunk" subdirectory under tags/version_1:
$REPOS/
|-- tags/
| `-- version_1
| `-- trunk
| `-- foo.c
`-- trunk/
`-- foo.c
svncopy.pl always created the destination directory in the repository
first, then copied the source into it; since the destination directory
already existed, the source directory was added as a child of the
destination. That's the same thing that svn copy would do for multiple
sources or an existing destination, but a single source would be
copied directly to the destination.
This patch special-cases a single source; with multiple sources,
svncopy.pl was already consistent with svn copy.
- Bradey
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2359284
Received on 2009-06-04 07:04:04 CEST