Docsity

Quick Start, Subversion URLs – Subversion Quick Reference Card | CS 10051, Study notes of Computer Science

Toggle sidebar
bg1
“svn-refcard” — 2004/3/29 — 10:08 — page 1 — #1
Subversion Quick Reference Card
$Rev: 28 $
Subversion is a version control system that is a replacement
for CVS. It has most of CVS’s features. Generally, Subversion’s
interface to a particular feature is similar to CVS’s, except where
there’s a compelling reason to do otherwise.
Quick start
svnadmin create /var/svnroot
svn import LocalDir file:///var/svnroot/ProjectName
svn checkout file:///var/svnroot/ProjectName
cd ProjectName
svn help [command]
Subversion URLs
file:// Direct repository access (on local disk).
http:// Access via WebDAV protocol to Subversion-aware
Apache server.
https:// Same as http://, but with SSL encryption.
svn:// Access via custom protocol to an svnserve server.
svn+ssh:// Same as svn://, but through an SSH tunnel.
svn subcommands
add Adds files and directories.
blame (praise,annotate,ann) Shows author and re-
vision information in-line for the specified files or
URLs.
cat Outputs the contents of the specified files or URLs.
checkout (co) Checks out a working copy from a repository.
cleanup Recursively clean up the working copy.
commit (ci) Send changes from your working copy to the
repository.
copy (cp) Copy a file or directory in a working copy or
in the repository.
delete (del,remove,rm) Delete an item from a working
copy or the repository.
diff (di) Display the differences between two paths.
export Exports a clean directory tree.
help Prints help text.
import Recursively commit a copy of local dir into a repos-
itory.
info Print information about PATHs.
list (ls) List directory entries in the repository.
log Displays commit log messages.
1
“svn-refcard” — 2004/3/29 — 10:08 — page 2 — #2
merge Apply the differences between two sources to a work-
ing copy path.
mkdir Create a new directory under version control.
move (mv,rename,ren) Move a file or directory.
propdel (pdel,pd) Remove a property from an item.
propedit (pedit,pe) Edit the property of one or more items
under version control.
propget (pget,pg) Prints the value of a property.
proplist (plist,pl) Lists all properties.
propset (pset,ps) Sets a property on files, directories, or
revisions.
resolved Remove conflicted state on working copy files or
directories.
revert Undo all local edits.
status (stat,st) Print the status of working copy files
and directories.
switch (sw) Update working copy to a different URL.
update (up) Updates your working copy.
svn switches
--config-dir DIR
Read configuration from DIR instead of ~/.subversion.
--diff-cmd CMD
Use external program CMD for generating diff output in-
stead of internal diff engine.
--diff3-cmd CMD
Use external program CMD for merging files.
--dry-run
Run the command without changing anything.
--editor-cmd CMD
Use external program CMD for editing files.
--encoding ENC
Instructs Subversion to use encoding ENC to store log mes-
sages.
--extensions ARG (-x)
Additional arguments for external diff, eg.: svn --diff-cmd
diff -x --normal diff main.c.
--file FILE (-F)
Use the contents of file FILE as an argument for a given
subcommand.
--force
Forces a particular subcommand to run.
--force-log
Forces a suspicious parameter passed to the --message
options to be accepted as valid.
--help (-h or -?)
Prints help for a given command or general help text.
2
“svn-refcard” — 2004/3/29 — 10:08 — page 3 — #3
--ignore-ancestry
Ignore ancestry when calculating differences (rely on path
contents alone).
--incremental
Prints output in a format suitable for concatenation.
--message (-m) MSG
Specify a commit message MSG.
--no-auth-cache
Prevents caching of authentication information.
--no-auto-props
Disable auto-props, overriding the enable-auto-props
directive in the config file.
--no-diff-deleted
Prevents Subversion from printing differences for deleted
files.
--no-ignore
Shows files in the status listing that would normally be
omitted since they match a pattern in the svn:ignore
property.
--non-interactive
Prevents prompting for authentication information.
--non-recursive (-N)
Stops a subcommand from recursing into subdirectories.
--notice-ancestry
Pay attention to ancestry when calculating differences.
--old ARG
Uses ARG as the older target.
--password PASS
Password for authentication.
--quiet (-q)
Print only essential information while performing an op-
eration.
--recursive (-R)
Makes a subcommand recurse into subdirectories.
--relocate FROM TO [PATH ...]
Used with the svn switch subcommand, changes the lo-
cation of the repository that your working copy references.
--revision REV (-r)
Supply a revision REV (or range of revisions) for a partic-
ular operation.
--revprop
Operates on a revision property instead of a Subversion
property specific to a file or directory (requires --revision
switch).
--show-updates (-u)
Causes the client to display information about which files
in your working copy are out-of-date.
3
pf2

Partial preview of the text

Download Quick Start, Subversion URLs – Subversion Quick Reference Card | CS 10051 and more Study notes Computer Science in PDF only on Docsity!

Subversion Quick Reference Card

$Rev:

Subversion

is a version control system that is a replacement

svnadmin Quick startthere’s a compelling reason to do otherwise.interface to a particular feature is similar to CVS’s, except wherefor CVS. It has most of CVS’s features. Generally, Subversion’s

create /var/svnroot

svn import

(^) LocalDir

file:///var/svnroot/

ProjectName

svn checkout

file:///var/svnroot/

ProjectName

cd

ProjectName

svn help

[

command

]

file:// Subversion URLs

Direct repository access (on local disk).

http://

Apache server.Access via WebDAV protocol to Subversion-aware

https://

Same as

http://

, but with SSL encryption.

svn://

Access via custom protocol to an

(^) svnserve

server.

svn+ssh://

Same as

svn://

, but through an SSH tunnel.

svn

subcommands

add

Adds files and directories.

blame

praise

annotate

ann

) Shows author and re-

URLs.vision information in-line for the specified files or

cat

Outputs the contents of the specified files or URLs.

checkout

co

) Checks out a working copy from a repository.

cleanup

Recursively clean up the working copy.

commit

ci

) Send changes from your working copy to the

repository.

copy

cp

) Copy a file or directory in a working copy or

in the repository.

delete

del

remove

rm

) Delete an item from a working

copy or the repository.

diff

di

) Display the differences between two paths.

export

Exports a clean directory tree.

help

Prints help text.

import

itory.Recursively commit a copy of local dir into a repos-

info

Print information about PATHs.

list

ls

) List directory entries in the repository.

log

Displays commit log messages.

merge

ing copy path.Apply the differences between two sources to a work-

mkdir

Create a new directory under version control.

move

mv

rename

ren

) Move a file or directory.

propdel

pdel

(^) pd

) Remove a property from an item.

propedit

pedit

pe

) Edit the property of one or more items

under version control.

propget

pget

(^) pg

) Prints the value of a property.

proplist

plist

pl

) Lists all properties.

propset

pset

ps

) Sets a property on files, directories, or

revisions.

resolved

directories.Remove conflicted state on working copy files or

revert

Undo all local edits.

status

stat

st

) Print the status of working copy files

and directories.

switch

sw

) Update working copy to a different URL.

update

up

) Updates your working copy.

svn

switches

--config-dir

DIR

Read configuration from

DIR

instead of

~/.subversion

--diff-cmd

CMD

Use external program

CMD

for generating

diff

output in-

stead of internal diff engine.

--diff3-cmd

CMD

Use external program

CMD

for merging files.

--dry-run

Run the command without changing anything.

--editor-cmd

CMD

Use external program

CMD

for editing files.

--encoding

ENC

Instructs Subversion to use encoding

ENC

to store log mes-

sages.

--extensions

ARG

(-x)

Additional arguments for external diff, eg.:

svn --diff-cmd

diff -x --normal diff main.c

--file

FILE

(-F)

Use the contents of file

FILE

as an argument for a given

subcommand.

--force

Forces a particular subcommand to run.

--force-log

Forces a suspicious parameter passed to the

--message

options to be accepted as valid.

--help (-h

or

Prints help for a given command or general help text.

--ignore-ancestry

contents alone). Ignore ancestry when calculating differences (rely on path

--incremental

Prints output in a format suitable for concatenation.

--message (-m)

MSG

Specify a commit message

MSG

--no-auth-cache

Prevents caching of authentication information.

--no-auto-props

Disable

auto-props

, overriding the

enable-auto-props

directive in the config file.

--no-diff-deleted

files. Prevents Subversion from printing differences for deleted

--no-ignore

omitted since they match a pattern in the Shows files in the status listing that would normally be

svn:ignore

property.

--non-interactive

Prevents prompting for authentication information.

--non-recursive (-N)

Stops a subcommand from recursing into subdirectories.

--notice-ancestry

Pay attention to ancestry when calculating differences.

--old

ARG

Uses

ARG

as the older target.

--password

PASS

Password for authentication.

--quiet (-q)

eration. Print only essential information while performing an op-

--recursive (-R)

Makes a subcommand recurse into subdirectories.

--relocate

FROM

TO

[

PATH

...]

Used with the

svn switch

subcommand, changes the lo-

cation of the repository that your working copy references.

--revision

REV

(-r)

Supply a revision

REV

(or range of revisions) for a partic-

ular operation.

--revprop

property specific to a file or directory (requires Operates on a revision property instead of a Subversion

(^) --revision

switch).

--show-updates (-u)

in your working copy are out-of-date. Causes the client to display information about which files

--stop-on-copy

countered. Stop harvesting historical information when a copy is en-

--strict

Causes Subversion to use strict semantics.

--targets

FILE

file Get the list of files that you wish to operate on from the

FILE

--username

NAME

Username for authentication.

--verbose (-v)

Verbose mode.

--version

Prints the client version info.

--xml

Prints output in XML format.

svnadmin

subcommands

list-unused-dblogs

Ask Berkeley DB which log files can be safely deleted.

create

Create a new, empty repository.

dump

Dump the contents of filesystem to stdout.

help

Help.

hotcopy

Makes a hot copy of a repository.

load

Read a dumpfile-formatted stream from stdin.

lstxns

Print the names of all uncommitted transactions.

recover

Recovers any lost state in a repository.

rmtxns

Deletes transactions from a repository.

setlog

Set the log-message on a revision.

svnadmin

switches

--bypass-hooks

Bypass the repository hook system.

--copies

Follow copy history when examining a path.

--in-repos-template

ARG

ating a new repository. Specify a template for the repository structure when cre-

--incremental

sion, instead of the usual fulltext. Dump a revision only as a diff against the previous revi-

--on-disk-template

ARG

repository you want to create. Specify a template to use for the on-disk structure of the

--revision

ARG

(-r)

Specify a particular revision to operate on.

svnlook

subcommands

author

Prints the author.

cat

Print the contents of a file.

changed

Print the paths that were changed.

date

Print the date stamp.

diff

Prints differences of changed files and properties.

dirs-changed

Print the directories that were themselves changed.

help

Help.

history

repository.Print information about the history of a path in the

info

log message.Print the author, date stamp, log message size, and

log

Print the log message.

proplist

directory properties.Print the names and values of versioned file and

tree

Print the tree.

youngest

Print the youngest revision number.

svnlook

switches

--no-diff-deleted

Prevents svnlook from printing differences for deleted files.

--revision

REV

(-r)

amine. Specify a particular revision number that you wish to ex-

--transaction

TID

(-t)

Specify a particular transaction id

TID

that you wish to

examine.

--show-ids

filesystem tree. Show the filesystem node revision IDs for each path in the

U^ File status

File was updated.

A

File was added.

D

File was deleted.

R

File was replaced.

G

File was merged.

C

Conflicting changes.

Resource is not under version control.

than Subversion).Resource is missing or incomplete (removed by another tool

svn:executable^ Special properties

Executable file permission.

svn:mime-type

MIME type of a file.

svn:ignore

obtained bysion operations will ignore. Full list may beList of file patterns which certain Subver-

svn status --no-ignore

svn:eol-style

Possible values are:

native

CRLF

LF

CR

svn:externals

out Subversion working copies.sioned directory with one or more other checked-Instructions for Subversion to populate a ver-

svn:keywords

$Date$ing commit:List of keywords that will be substituted dur-

date of the last modification

$Rev$

revision number

$Author$

the last user who changed the file

$URL$

the file in the repositoryfull URL to the latest version of

$Id$

words abovecompressed combination of key-

File Client configuration

~/.subversion/config

.c = svn:eol-style=native;svn:keywords=Id.bat = svn:eol-style=CRLF*.sh = svn:executable[auto-props]enable-auto-props = yeslog-encoding = iso-8859-2[miscellany]editor-cmd = vim [helpers]

Autocompletion in

bash

. shopt -s extglob progcomp

/usr/share/subversion/.../bash_completion

http://subversion.tigris.org^ Other sources of information

Home page of the Subversion project.

http://svnbook.red-bean.com

Version Control with Subversion

— a book on Subversion.

http://tortoisesvn.tigris.org/

mented as a windows shell extension. TortoiseSVN is a Windows client for Subversion imple-

Compiled by

Cezary Sobaniec

http://www.cs.put.poznan.pl/csobaniec/