检查 Mercurial 内部文件的工具

发布于 2024-12-17 13:28:42 字数 170 浏览 0 评论 0原文

Git 有 cat-file 命令来检查内部文件,例如 git cat-file blob 557db03 将显示哈希以 557db03 开头的对象的内容。

Mercurial 是否有类似的工具可以让我查看merfcurial 内部使用的所有不同数据文件?

Git has the cat-file command to inspect internal files, e.g. git cat-file blob 557db03 will show the contents of the object whose hash starts with 557db03.

Are there similar tools for mercurial that allow me to look at all the different data files that merfcurial uses internally?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心凉怎暖 2024-12-24 13:28:42

尝试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)

它们有很多,而且它们几乎暴露了所有内容。

Try hg --debug help and you can see the list of all the debug commands:

 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)

There are a lot of them, and they pretty much expose everything.

残龙傲雪 2024-12-24 13:28:42

最接近的命令是:

hg cat -r rev aFile

hg cat:打印指定文件在给定版本中的样子

这与 git cat- 不完全相同file ,因为后者也可以列出对象列表的 SHA1、类型和大小。

在第二种情况下, hg 清单 可能更合适。

The closest commands would be:

hg cat -r rev aFile

hg cat: Print the specified files as they were at the given revision

This is not completely the same than git cat-file though, as the latter can also list SHA1, type, and size for a list of objects.

In that second case, hg manifest might be more appropriate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文