2

I'm developing some Django application on Windows host computer. I've created fabfile with tasks. In one of my steps I execute something like that:

local("hg pull")
local("hg update")

and it works properly.

In other task I try to execute on remote machine something similar:

run("hg pull")

but after that I get error:

[XXX.XXX.XXX.XXX] run: hg pull
Exception in thread Thread-6:
Traceback (most recent call last):
  File "C:\Python27\Lib\threading.py", line 808, in __bootstrap_inner
    self.run()
  File "C:\Users\Grzegorz\VirtualEnvs\Dummy\lib\site-packages\paramiko\agent.py", line 116, in run
    self._communicate()
  File "C:\Users\Grzegorz\VirtualEnvs\Dummy\lib\site-packages\paramiko\agent.py", line 122, in _communicate
    import fcntl
ImportError: No module named fcntl

Do you have any advices how can I pull and updated changes from my mercurial repository?

4

2 回答 2

0

这对我来说失败并出现同样的错误,直到我设置:

fabric.api.env.forward_agent = False

我最初有一个 ssh:// 目标作为默认存储库,所以我猜这是远程 ssh-agent 不喜欢我的身份(但更喜欢远程用户而不是我试图转发的那个)。

正如您所做的那样,切换到 https:// 目标也可以通过回避 ssh 身份来解决这个问题。

于 2014-04-08T04:37:38.020 回答
0

好的,现在它可以工作了。我没有在我的虚拟环境中更改任何内容,而是从存储库设置了到我的源代码的正确路径并调用了类似的东西:

run('hg pull https://usr:pwd@bitbucket.org/account/myproject')
于 2013-09-06T07:40:43.147 回答