Mercurial - 在归档文件中导出历史文件

时间:2012-02-14 00:52:33

标签: mercurial tortoisehg

我想使用“hg archive”交付我的项目。我看到的唯一问题是该存档中没有历史文件。有没有办法将完整历史记录导出到同一个文件中?

根据历史,我的意思是修订说明。

2 个答案:

答案 0 :(得分:2)

hg archive专门用于删除任何历史上下文/版本控制数据。

如果您想要存储库的历史记录,只需复制实际的存储库。

答案 1 :(得分:0)

运行hg archive后,您可以运行hg log --style compact > history.log。您最终会得到一个包含以下内容的文件:

598[tip][master]   9e6089ab583e   2012-01-31 17:33 -0800   ludovic
  Fixed bug with invalid cache deleting the server cache.

597   31db8a573628   2012-01-31 17:33 -0800   ludovic
  Added ability to bake a single directory.

596   94984a322204   2012-01-31 17:32 -0800   ludovic
  Added helper function to create dummy posts.

595[github/master]   7cc23cfe234b   2012-01-30 11:55 -0800   ludovic
  Added another test for file baking.

594   044b67accf3c   2012-01-30 11:55 -0800   ludovic
  Throw an error about not supporting asset sub-directories.

593   dd1943298b06   2012-01-30 10:23 -0800   ludovic
  Make `PieCrustPlugin::getName` abstract.

您可以使用任何预定义样式自定义hg log的输出,或with a style of your own,具体取决于您在该历史记录文件中需要多少信息。