Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Collins-Sussman B.Version control with Subversion 1.1.pdf
Скачиваний:
9
Добавлен:
23.08.2013
Размер:
1.53 Mб
Скачать

Subversion Complete Reference

Name

svnadmin load -- Read a “dumpfile”-formatted stream from stdin.

svnadmin load

Synopsis

svnadmin load REPOS_PATH

Description

Read a “dumpfile”-formatted stream from stdin, committing new revisions into the repository's filesystem. Send progress feedback to stdout.

Switches

--quiet (-q) --ignore-uuid --force-uuid --parent-dir

Example

This shows the beginning of loading a repository from a backup file (made, of course, with svnadmin dump):

$ svnadmin load /usr/local/svn/restored < repos-backup

<<<Started new txn, based on original revision 1

*adding path : test ... done.

*adding path : test/a ... done.

Or if you want to load into a subdirectory:

$ svnadmin load --parent-dir new/subdir/for/project /usr/local/svn/restored < repos-backup

<<<Started new txn, based on original revision 1

*adding path : test ... done.

*adding path : test/a ... done.

231

Subversion Complete Reference

Name

svnadmin lstxns -- Print the names of all uncommitted transactions.

svnadmin lstxns

Synopsis

svnadmin lstxns REPOS_PATH

Description

Print the names of all uncommitted transactions. See the section called “Repository Cleanup” for information on how uncommitted transactions are created and what you should do with them.

Examples

List all outstanding transactions in a repository.

$ svnadmin lstxns /usr/local/svn/repos/ 1w

1x

232

Subversion Complete Reference

Name

svnadmin recover -- Bring a repository database back into a consistent state (applies only to repositories using the bdb backend).

svnadmin recover

Synopsis

svnadmin recover REPOS_PATH

Description

Run this command if you get an error indicating that your repository needs to be recovered.

Switches

--wait

Examples

Recover a hung repository:

$ svnadmin recover /usr/local/svn/repos/ Repository lock acquired.

Please wait; recovering the repository may take some time...

Recovery completed.

The latest repos revision is 34.

Recovering the database requires an exclusive lock on the repository. If another process is accessing the repository, then svnadmin recover will error:

$ svnadmin recover /usr/local/svn/repos

svn: Failed to get exclusive repository access; perhaps another process such as httpd, svnserve or svn has it open?

$

The --wait option, however, will cause svnadmin recover to wait indefinitely for other processes to disconnect:

$ svnadmin recover /usr/local/svn/repos --wait

Waiting on repository lock; perhaps another process has it open?

### time goes by...

Repository lock acquired.

Please wait; recovering the repository may take some time...

Recovery completed.

The latest repos revision is 34.

233

Subversion Complete Reference

Name

svnadmin rmtxns -- Delete transactions from a repository.

svnadmin rmtxns

Synopsis

svnadmin rmtxns REPOS_PATH TXN_NAME...

Description

Delete outstanding transactions from a repository. This is covered in detail in the section called “Repository Cleanup”.

Switches

--quiet (-q)

Examples

Remove named transactions:

$ svnadmin rmtxns /usr/local/svn/repos/ 1w 1x

Fortunately, the output of lstxns works great as the input for rmtxns:

$ svnadmin rmtxns /usr/local/svn/repos/ `svnadmin lstxns /usr/local/svn/repos/`

Which will remove all uncommitted transactions from your repository.

234

Соседние файлы в предмете Электротехника