如何创建我的Mercurial仓库的拉链以供发布?

Zor*_*lla 10 mercurial

作为我的发布过程的一部分,我想创建一个zip文件,该文件基本上是特定版本时hg工作目录的转储.以自动方式执行此操作的最简单方法是什么?

顺便说一句,如果我只是"zip -r proj.zip",那zip将包含我不想要的各种东西 - 比如编译文件,emacs自动备份,还有.hg目录本身......

Nia*_* C. 16

用途hg archive:

hg archive -t zip /destination/path/zipfile.zip
Run Code Online (Sandbox Code Playgroud)

它还需要标准-r选项来存档除提示之外的修订.

  • 较新版本甚至会直接从文件扩展名中猜出类型,所以`hg archive foo.zip`就足够了. (3认同)