制作一个没有前缀的 mercurial 存档 [英] Make a mercurial archive without prefix

查看:29
本文介绍了制作一个没有前缀的 mercurial 存档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许是一个愚蠢的问题,但我的谷歌搜索不起作用.在我的存储库根目录上执行以下操作:

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

$ hg archive my_archive.tar.gz

给我一​​个名为 my_archive 的内部目录的 tar.gz 文件,然后在我的 repo 内容中.

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

我明白这是 hg arhives 的帮助:

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

添加到存档文件的每个成员都有一个目录前缀.

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

使用 -p/--prefix 指定前缀的格式字符串.这默认是存档的基本名称,删除后缀.

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.

这可能吗?

推荐答案

指定前缀为当前目录:

hg archive -p . my_archive.tar.gz

这篇关于制作一个没有前缀的 mercurial 存档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆