我不能离线使用 hg update 吗?
当我使用 Mercurial 并尝试
hg update --repository C:\Projekt\Learnify\Systems\myapp -rev 271 --check
在没有网络连接的情况下进行操作时,我得到:
"URLError getaddrinfo failed".
既然实际存储库位于我的计算机上,我就不能这样做吗?
When I use Mercurial and try to do a
hg update --repository C:\Projekt\Learnify\Systems\myapp -rev 271 --check
without network connection I get
"URLError getaddrinfo failed".
Shouldn't I be able to to this since the actual repository is on my computer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
另一种猜测是,您的存储库中有一个子存储库引用,该引用具有到远程位置的绝对路径,并且您正在更新到父存储库中的变更集,该变更集引用了子存储库中您本地没有的变更集,因此它是尝试对作为子存储库引用的远程存储库进行拉取。因此,阻止更新的不是需要连接到存储库本身的远程存储库,而是绝对引用的子存储库。
another guess is that you have a subrepository reference in your repository that has an absolute path to a remote location and you are updating to a changeset in your parent repository that references a changeset in the subrepository that you don't have locally, so it is trying to do a pull on that remote repository that is referenced as a subrepository. so what is preventing your update is not a need to connect to a remote repository for your repository itself, but for the subrepository that is referenced absolutely.
尝试
告诉 Hg 这不是一个网络协议 URI
try
to tell Hg it is not a network protocol URI
我的猜测是您正在使用共享存储库(使用“hg share”而不是“hg clone”命令克隆的存储库)。这意味着历史从未被克隆。您可以检查文件“.hg/sharedpath”。如果此文件存在,则实际存储库位于其他位置。
我建议当您重新上线时,对您的存储库进行另一个克隆。
My guess is that you are using a shared repository (one that cloned with 'hg share' instead of 'hg clone' command). That means the history had been never cloned. You can check for a file '.hg/sharedpath'. If this file exists then actual repo is located elsewhere.
I'd suggest when you'll back online, make another clone of your repository.