Make a mercurial archive without prefix

浪子不回头ぞ 提交于 2019-12-23 20:16:53

问题


Maybe a a silly question, but my googles don't work. Doing the following on my repository root:

$ hg archive my_archive.tar.gz

Gives me a tar.gz file with an inner directory named my_archive, then inside my repo contents.

I understand this is meant by hg arhives's help:

Each member added to an archive file has a directory prefix prepended.

Use -p/--prefix to specify a format string for the prefix. The default is the basename of the archive, with suffixes removed.

But it boggles my deployment workflow. I need it without the inner dir.

Is that possible?


回答1:


Specify the prefix as the current directory:

hg archive -p . my_archive.tar.gz


来源:https://stackoverflow.com/questions/12198881/make-a-mercurial-archive-without-prefix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!