Skip to Main Content
Version Control with Subversion, 2nd Edition
book

Version Control with Subversion, 2nd Edition

by C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick
September 2008
Intermediate to advanced content levelIntermediate to advanced
432 pages
13h 57m
English
O'Reilly Media, Inc.
Content preview from Version Control with Subversion, 2nd Edition

Name

svn copy — Copy a file or directory in a working copy or in the repository.

Synopsis

svn copy SRC[@REV]... DST

Description

Copy one or more files in a working copy or in the repository. When copying multiple sources, they will be added as children of DST, which must be a directory. SRC and DST can each be either a working copy (WC) path or URL:

WC → WC

Copy and schedule an item for addition (with history).

WC → URL

Immediately commit a copy of WC to URL.

URL → WC

Check out URL into WC and schedule it for addition.

URL → URL

Complete server-side copy. This is usually used to branch and tag.

When copying multiple sources, they will be added as children of DST, which must be a directory.

If no peg revision (i.e., @REV) is supplied, by default the BASE revision will be used for files copied from the working copy, whereas the HEAD revision will be used for files copied from a URL.

Note

You can only copy files within a single repository. Subversion does not support cross-repository copying.

Alternate names

cp.

Changes

Repository if destination is a URL; working copy if destination is a WC path.

Accesses repository

Yes, if source or destination is in the repository, or if needed to look up the source revision number.

Options

--editor-cmd EDITOR
--encoding ENC
--file (-F) FILE
--force-log
--message (-m) TEXT
--parents
--quiet (-q)
--revision (-r) REV
--with-revprop ARG

Examples

Copy an item within your working copy (this schedules the copy—nothing goes into the repository until you commit):

$ svn copy foo.txt ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Subversion Version Control: Using The Subversion Version Control System in Development Projects

Subversion Version Control: Using The Subversion Version Control System in Development Projects

William Nagel
Version Control with Git, 3rd Edition

Version Control with Git, 3rd Edition

Prem Kumar Ponuthorai, Jon Loeliger

Publisher Resources

ISBN: 9780596510336Errata Page