简体   繁体   English

在Linux上运行Hg Convert

[英]Running hg convert on Linux

I would like to convert a remote Perforce repository into a Mercurial repository on Linux. 我想将远程Perforce存储库转换为Linux上的Mercurial存储库。 So I have installed Python and Mercurial on a Linux box. 因此,我在Linux机器上安装了Python和Mercurial。

Then I test few hg (Mercurial's drive program) commands. 然后,我测试了几个hg(Mercurial的驱动程序)命令。 All are working fine . 一切都很好

Now without creating any hg repository on the Linux box I want to run hg convert on Linux, so that a Mercurial repository (of a Perforce repository) will be created on it. 现在,无需在Linux上创建任何hg存储库,我想在Linux上运行hg convert ,以便在其上创建(Perforce存储库的)Mercurial存储库。

But when I tried the "hg convert" command it was not working. 但是,当我尝试“ hg convert”命令时,它不起作用。 I know "convert" extension needs to be configured in the .hgrc file. 我知道需要在.hgrc文件中配置“转换”扩展名。 But I don't have any hg repositories here. 但是我这里没有任何汞储存库。

Is there any any place on Linux where I can create hgrc file with convert extension so that hg convert command will be accessible for me? Linux上有什么地方可以创建带有convert扩展名的hgrc文件 ,以便可以使用hg convert命令?

or 要么

Should I first create a hg init hgrepo on Linux and then edit .hg/hgrc file with proper configurations and then perform hg convert //perforce repo/.. /root/hgrepo on hgrepo? 我应该首先在Linux上创建一个hg初始化hgrepo ,然后使用正确的配置编辑.hg / hgrc文件,然后在hgrepo上执行hg convert // perforce repo /../ root / hgrepo吗?

What can I do to resolve this issue? 我该怎么做才能解决这个问题?

将.hgrc放在主目录中,请参见手册: hgrc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM