Make a mercurial archive without prefix

2019-07-13 10:33发布

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条回答
Viruses.
2楼-- · 2019-07-13 10:40

Specify the prefix as the current directory:

hg archive -p . my_archive.tar.gz
查看更多
登录 后发表回答