hg revert [ПАРАМЕТР]... [-r РЕВИЗИЯ] [ИМЯ]...

восстановить файлы до их состояния в хранилище

.. note::

   To check out earlier revisions, you should use :hg:`update REV`.
   To cancel an uncommitted merge (and lose your changes),
   use :hg:`merge --abort`.

With no revision specified, revert the specified files or directories
to the contents they had in the parent of the working directory.
This restores the contents of files to an unmodified
state and unschedules adds, removes, copies, and renames. If the
working directory has two parents, you must explicitly specify a
revision.

Using the -r/--rev or -d/--date options, revert the given files or
directories to their states as of a specific revision. Because
revert does not change the working directory parents, this will
cause these files to appear modified. This can be helpful to "back
out" some or all of an earlier change. See :hg:`backout` for a
related method.

Modified files are saved with a .orig suffix before reverting.
To disable these backups, use --no-backup. It is possible to store
the backup files in a custom directory relative to the root of the
repository by setting the ``ui.origbackuppath`` configuration
option.

See :hg:`help dates` for a list of formats valid for -d/--date.

See :hg:`help backout` for a way to reverse the effect of an
earlier changeset.

Returns 0 on success.


options ([+] can be repeated):

 == ==================== ===============================================================
 -a --all                без аргументов - вернуть файлы к прежнему состоянию            
 -d --date ДАТА          максимальная ревизия не позднее ДАТЫ                           
 -r --rev РЕВИЗИЯ        вернуть состояние на момент указанной ревизии                  
 -C --no-backup          не сохранять резервные копии файлов                            
 -i --interactive        interactively select the changes                               
 -I --include ШАБЛОН [+] добавить файлы, имена которых соответствуют данным шаблонам    
 -X --exclude ШАБЛОН [+] не добавлять файлы, имена которых соответствуют данным шаблонам
 -n --dry-run            ничего реально не делать, просто напечатать вывод              
 == ==================== ===============================================================

global options ([+] can be repeated):

 == ====================== =======================================================================================================================
 -R --repository ХРАНИЛИЩЕ корневой каталог хранилища или имя файла комплекта                                                                     
    --cwd КАТАЛОГ          сменить рабочий каталог                                                                                                
 -y --noninteractive       не спрашивать, на все вопросы автоматически выбирать первый вариант                                                    
 -q --quiet                подавлять вывод                                                                                                        
 -v --verbose              включить дополнительный вывод                                                                                          
    --color ТИП            when to colorize (boolean, always, auto, never, or debug)                                                              
    --config КОНФИГ [+]    задать/переопределить параметр конфигурации (в виде 'секция.параметр=значение')                                        
    --config-file HGRC [+] load config file to set/override config options                                                                        
    --debug                включить отладочный вывод                                                                                              
    --debugger             запустить отладчик                                                                                                     
    --encoding КОДИРОВКА   установить кодировку (по умолчанию: UTF-8)                                                                             
    --encodingmode РЕЖИМ   установить режим кодировки (по умолчанию: strict)                                                                      
    --traceback            всегда печатать трассировку стека при исключении                                                                       
    --time                 время выполнения команды                                                                                               
    --profile              профилирование выполнения команды                                                                                      
    --version              напечатать информацию о версии и выйти                                                                                 
 -h --help                 показать справку и выйти                                                                                               
    --hidden               учитывать скрытые наборы изменений                                                                                     
    --pager ТИП            когда использовать прокрутку (логический. always (всегда), auto(автоматически) или never (никогда) (по умолчанию: auto)
 == ====================== =======================================================================================================================