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

Subversion Complete Reference

Name

svn resolved -- Remove “conflicted” state on working copy files or directories.

svn resolved

Synopsis

svn resolved PATH...

Description

Remove “conflicted” state on working copy files or directories. This routine does not semantically resolve conflict markers; it merely removes conflict-related artifact files and allows PATH to be committed again; that is, it tells Subversion that the conflicts have been “resolved”. See the section called “Resolve Conflicts (Merging Others' Changes)” for an in-depth look at resolving conflicts.

Alternate Names

None

Changes

Working copy

Accesses Repository

No

Switches

--targets FILENAME --recursive (-R) --quiet (-q) --config-dir DIR

Examples

If you get a conflict on an update, your working copy will sprout three new files:

$ svn update C foo.c

Updated to revision 31. $ ls

foo.c

foo.c.mine

foo.c.r30

foo.c.r31

Once you've resolved the conflict and foo.c is ready to be committed, run svn resolved to let your working copy know you've taken care of everything.

Warning

211

Subversion Complete Reference

You can just remove the conflict files and commit, but svn resolved fixes up some bookkeeping data in the working copy administrative area in addition to removing the conflict files, so we recommend that you use this command.

212

Subversion Complete Reference

Name

svn revert -- Undo all local edits.

svn revert

Synopsis

svn revert PATH...

Description

Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will not only revert the contents of an item in your working copy, but also any property changes. Finally, you can use it to undo any scheduling operations that you may have done (e.g. files scheduled for addition or deletion can be “unscheduled”).

Alternate Names

None

Changes

Working copy

Accesses Repository

No

Switches

--targets FILENAME --recursive (-R) --quiet (-q) --config-dir DIR

Examples

Discard changes to a file:

$ svn revert foo.c Reverted foo.c

If you want to revert a whole directory of files, use the --recursive flag:

$ svn revert --recursive . Reverted newdir/afile Reverted foo.c

Reverted bar.txt

Lastly, you can undo any scheduling operations:

213

Subversion Complete Reference

$ svn add mistake.txt whoops

A

mistake.txt

A

whoops

A

whoops/oopsie.c

$ svn revert mistake.txt whoops Reverted mistake.txt

Reverted whoops

$ svn status

?mistake.txt

?whoops

Note

If you provide no targets to svn revert, it will do nothing—to protect you from accidentally losing changes in your working copy, svn revert requires you to provide at least one target.

214

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