2013-11-19 8 views
1

Мне нужно найти все удаленные файлы из SVN. Затем проверьте, нуждается ли файл в восстановлении после его прохождения. Если да, то восстановите. Как это сделать. Я знаю, что могу восстановить удаленный файл, но ему нужны номера версий.Как найти все коммиты (номера версий), в которых файл был удален/перемещен в SVN

ответ

1

Вы можете использовать svn log --search (доступный с SVN 1.8), чтобы просмотреть версию, в которой был удален конкретный файл, а затем восстановить его.

Следующая команда найдет изменения, в которых файл MyProject/MyForm.cs был удален.

svn log -v --search "MyProject/MyForm.cs" --search-and "D" http://svn.example.com/svn/MyRepository 

Я не вижу описание нового --search аргумента в SVNBook так, включая справки командной строки для справки (проверить svn help log для получения дополнительной информации):

If the --search option is used, log messages are displayed only if the 
provided search pattern matches any of the author, date, log message 
text (unless --quiet is used), or, if the --verbose option is also 
provided, a changed path. 
The search pattern may include "glob syntax" wildcards: 
    ?  matches any single character 
    *  matches a sequence of arbitrary characters 
    [abc] matches any of the characters listed inside the brackets 
If multiple --search options are provided, a log message is shown if 
it matches any of the provided search patterns. If the --search-and 
option is used, that option's argument is combined with the pattern 
from the previous --search or --search-and option, and a log message 
is shown only if it matches the combined search pattern. 
If --limit is used in combination with --search, --limit restricts the 
number of log messages searched, rather than restricting the output 
to a particular number of matching log messages. 

 Смежные вопросы

  • Нет связанных вопросов^_^