инструмент для проверки внутренних файлов Mercurial - PullRequest
5 голосов
/ 24 ноября 2011

Git имеет команду cat-file для проверки внутренних файлов, например, git cat-file blob 557db03 покажет содержимое объекта, хэш которого начинается с 557db03.

Существуют ли аналогичные инструменты для ртути, которые позволяют мне просматриватьвсе различные файлы данных, которые Merfcurial использует для внутреннего использования?

Ответы [ 2 ]

6 голосов
/ 25 ноября 2011

Попробуйте hg --debug help, и вы увидите список всех команд отладки:

 debugancestor:
      find the ancestor revision of two revisions in a given index
 debugbuilddag:
      builds a repo with a given DAG from scratch in the current empty repo
 debugbundle:
      lists the contents of a bundle
 debugcheckstate:
      validate the correctness of the current dirstate
 debugcommands:
      list all available commands and options
 debugcomplete:
      returns the completion list associated with the given command
 debugdag:
      format the changelog or an index DAG as a concise textual description
 debugdata:
      dump the contents of a data file revision
 debugdate:
      parse and display a date
 debugdiscovery:
      runs the changeset discovery protocol in isolation
 debugfileset:
      parse and apply a fileset specification
 debugfsinfo:
      show information detected about current filesystem
 debuggetbundle:
      retrieves a bundle from a repo
 debugignore:
      display the combined ignore pattern
 debugindex:
      dump the contents of an index file
 debugindexdot:
      dump an index DAG as a graphviz dot file
 debuginstall:
      test Mercurial installation
 debugknown:
      test whether node ids are known to a repo
 debugpushkey:
      access the pushkey key/value protocol
 debugrebuildstate:
      rebuild the dirstate as it would look like for the given revision
 debugrename:
      dump rename information
 debugrevlog:
      show data and statistics about a revlog
 debugrevspec:
      parse and apply a revision specification
 debugsetparents:
      manually set the parents of the current working directory
 debugstate:
      show the contents of the current dirstate
 debugsub:
      (no help text available)
 debugwalk:
      show how files match on given patterns
 debugwireargs:
      (no help text available)

Их много, и они в значительной степени раскрывают все.

2 голосов
/ 24 ноября 2011

Ближайшими командами будут:

hg cat -r rev aFile

hg cat: распечатать указанные файлы, как они были в данной ревизии

Это не совсем то же самое, что git cat-file, хотя последний также может перечислять SHA1, тип и размер для списка объектов.

В этом втором случае hg manifest может быть более подходящим.

...