尝试通过提交从 mercurial repo 安装 cocoapod 时出错

Getting an error when attempting to install a cocoapod from a mercurial repo by commit

我目前在 mercurial 仓库中有一个 cocoapod,我可以在我的 podfile 中使用以下行安装它而不会出错:

pod 'MyPod', :hg => 'https://hg.example.com/pod/mypod'

但是,我想根据信息 seen here.

为我的 Podfile 指定一个特定的提交目标

具体来说,

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :commit => '0f506b1c45'

但是,该示例适用于 git 存储库,而不是 mercurial 存储库。

当我添加提交存储库时,如下所示,我收到以下错误消息:

pod 'MyPod', :hg => 'https://hg.example.com/pod/mypod', :commit => 'abcd1234'

Analyzing dependencies Pre-downloading: MyPod from https://hg.example.com/pod/mypod, commit abcd1234

[!] Error installing MyPod Unrecognized options [:commit]

虽然我知道我也可以标记提交并将我的 podfile 指向它,但在这种情况下这样做不是一个选项。

解决办法是将commit改为revision。我无法在他们的示例页面上找到它。

pod 'MyPod', :hg => 'https://hg.example.com/pod/mypod', :revision => 'abcd1234'