hg log [ПАРАМЕТР]... [ФАЙЛ]

псевдонимы: history

показать историю ревизий всего хранилища или файлов

Print the revision history of the specified files or the entire
project.

If no revision range is specified, the default is ``tip:0`` unless
--follow is set.

File history is shown without following rename or copy history of
files. Use -f/--follow with a filename to follow history across
renames and copies. --follow without a filename will only show
ancestors of the starting revisions. The starting revisions can be
specified by -r/--rev, which default to the working directory parent.

By default this command prints revision number and changeset id,
tags, non-trivial parents, user, date and time, and a summary for
each commit. When the -v/--verbose switch is used, the list of
changed files and full commit message are shown.

With --graph the revisions are shown as an ASCII art DAG with the most
recent changeset at the top.
'o' is a changeset, '@' is a working directory parent, '%' is a changeset
involved in an unresolved merge conflict, '_' closes a branch,
'x' is obsolete, '*' is unstable, and '+' represents a fork where the
changeset from the lines below is a parent of the 'o' merge on the same
line.
Paths in the DAG are represented with '|', '/' and so forth. ':' in place
of a '|' indicates one or more revisions in a path are omitted.

.. container:: verbose

   Use -L/--line-range FILE,M:N options to follow the history of lines
   from M to N in FILE. With -p/--patch only diff hunks affecting
   specified line range will be shown. This option requires --follow;
   it can be specified multiple times. Currently, this option is not
   compatible with --graph. This option is experimental.

.. note::

   :hg:`log --patch` may generate unexpected diff output for merge
   changesets, as it will only compare the merge changeset against
   its first parent. Also, only files different from BOTH parents
   will appear in files:.

.. note::

   For performance reasons, :hg:`log FILE` may omit duplicate changes
   made on branches and will not show removals or mode changes. To
   see all such changes, use the --removed switch.

.. container:: verbose

   .. note::

      The history resulting from -L/--line-range options depends on diff
      options; for instance if white-spaces are ignored, respective changes
      with only white-spaces in specified line range will not be listed.

.. container:: verbose

  Some examples:

  - changesets with full descriptions and file lists::

      hg log -v

  - changesets ancestral to the working directory::

      hg log -f

  - last 10 commits on the current branch::

      hg log -l 10 -b .

  - changesets showing all modifications of a file, including removals::

      hg log --removed file.c

  - all changesets that touch a directory, with diffs, excluding merges::

      hg log -Mp lib/

  - all revision numbers that match a keyword::

      hg log -k bug --template "{rev}\n"

  - the full hash identifier of the working directory parent::

      hg log -r . --template "{node}\n"

  - list available log templates::

      hg log -T list

  - check if a given changeset is included in a tagged release::

      hg log -r "a21ccf and ancestor(1.9)"

  - find all changesets by some user in a date range::

      hg log -k alice -d "may 2008 to jul 2008"

  - summary of all changesets after the last tag::

      hg log -r "last(tagged())::" --template "{desc|firstline}\n"

  - changesets touching lines 13 to 23 for file.c::

      hg log -L file.c,13:23

  - changesets touching lines 13 to 23 for file.c and lines 2 to 6 of
    main.c with patch::

      hg log -L file.c,13:23 -L main.c,2:6 -p

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

See :hg:`help revisions` for more about specifying and ordering
revisions.

See :hg:`help templates` for more about pre-packaged styles and
specifying custom templates. The default template used by the log
command can be customized via the ``command-templates.log`` configuration
setting.

Returns 0 on success.



options ([+] can be repeated):

 == =========================== =====================================================================================
 -f --follow                    следовать истории набора изменений или истории файла при копированиях/переименованиях
    --follow-first              следовать только за первым родителем ревизий слияния (УСТАРЕЛО)                      
 -d --date ДАТА                 показывать ревизии с датой, соответствующей данной                                   
 -C --copies                    показывать скопированные файлы                                                       
 -k --keyword ТЕКСТ [+]         выполнить поиск данного текста, игнорируя регистр                                    
 -r --rev РЕВИЗИЯ [+]           revisions to select or follow from                                                   
 -L --line-range FILE,RANGE [+] follow line range of specified file (EXPERIMENTAL)                                   
    --removed                   включить ревизии, в которых файлы были удалены                                       
 -m --only-merges               show only merges (DEPRECATED) (use -r "merge()" instead)                             
 -u --user ПОЛЬЗОВАТЕЛЬ [+]     только ревизии данного пользователем                                                 
    --only-branch ВЕТКА [+]     показывать только ревизии на данной именованной ветке (УСТАРЕЛО)                     
 -b --branch ВЕТКА [+]          показывать наборы изменений на данной именованной ветке                              
 -B --bookmark ЗАКЛАДКА [+]     show changesets within the given bookmark                                            
 -P --prune РЕВИЗИЯ [+]         не показывать ревизию и всех ее предшественников                                     
 -p --patch                     показать патч                                                                        
 -g --git                       использовать расширенный формат git для различий                                     
 -l --limit КОЛ-ВО              ограничивать количество отображаемых изменений                                       
 -M --no-merges                 не показывать слияния                                                                
    --stat                      отображать сводку изменений в стиле diffstat                                         
 -G --graph                     показать граф ревизий                                                                
    --style СТИЛЬ               отображать с использование файла-карты шаблонов (УСТАРЕЛО)                           
 -T --template ШАБЛОН           отображать с помощью шаблона                                                         
 -I --include ШАБЛОН [+]        добавить файлы, имена которых соответствуют данным шаблонам                          
 -X --exclude ШАБЛОН [+]        не добавлять файлы, имена которых соответствуют данным шаблонам                      
 == =========================== =====================================================================================

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)
 == ====================== =======================================================================================================================