【问题标题】:Help getting Mercurial running on a Media Temple (gs)帮助在 Media Temple (gs) 上运行 Mercurial
【发布时间】:2011-02-05 06:46:37
【问题描述】:

我已经按照 MT 的知识库文件 here 安装了 Mercurial。

在我的 Mac 上使用 ssh 在服务器端工作可以正常工作。我可以初始化存储库等,但从服务器拉取或从我的 Mac 推送会产生我不明白的错误。

这是我从本地安装调用 hg push 时得到的结果(哈希标记代表我的服务器编号):

remote: Traceback (most recent call last):
remote:   File "/home/#####/users/.home/data/mercurial-1.5/hg", line 27, in ?
remote:     mercurial.dispatch.run()
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/dispatch.py", line 16, in run
remote:     sys.exit(dispatch(sys.argv[1:]))
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/dispatch.py", line 21, in dispatch
remote:     u = _ui.ui()
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/ui.py", line 38, in __init__
remote:     for f in util.rcpath():
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/util.py", line 1200, in rcpath
remote:     _rcpath = os_rcpath()
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/util.py", line 1174, in os_rcpath
remote:     path = system_rcpath()
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/posix.py", line 41, in system_rcpath
remote:     path.extend(rcfiles(os.path.dirname(sys.argv[0]) +
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/posix.py", line 30, in rcfiles
remote:     rcs.extend([os.path.join(rcdir, f)
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/demandimport.py", line 75, in __getattribute__
remote:     self._load()
remote:   File "/nfs/c05/h01/mnt/#####/data/mercurial-1.5/mercurial/demandimport.py", line 47, in _load
remote:     mod = _origimport(head, globals, locals)
remote: ImportError: No module named osutil
abort: no suitable response from remote hg!

我的 Mac 上的 Mercurial 配置如下

[ui]
username = John Smith
editor = te -w
remotecmd = ~/data/mercurial-1.5/hg

我的本​​地单repo配置如下(井号代表我的服务器号):

[paths]
default = ssh://mysite.com@s#####.gridserver.com/domains/mysite.com/html

服务器上的 Mercurial 只配置了一个用户名:

[ui]
username = John Smith

服务器 .bash_profile 配置如下(根据安装指南):

# Added this as suggested by the MediaTemple guide
export PYTHONPATH=${HOME}/lib/python:$PYTHONPATH
export PATH=${HOME}/bin:$PATH

我知道这可能不是 MediaTemple 问题,而更可能是安装问题。我真的很感激在这方面的任何帮助。提前致谢!

【问题讨论】:

    标签: mercurial mediatemple


    【解决方案1】:

    你的 mercurial 安装不完整,你没有编译 osutil 模块(应该有一个 osutil.so 某处)。

    【讨论】:

    • 感谢您的快速回复。我正在寻找任何可以指出我在哪里解决该问题的文档,但我似乎无法找到它。有任何想法吗?我真的不擅长调试这类东西。
    • @bschaeffer hg debuginstall 在服务器上。
    【解决方案2】:

    @tonfa,

    hgdebuginstall 没有产生任何错误,这就是我遇到的问题如此奇怪的原因。

    感谢您的回复,我进行了一些挖掘并在~/lib/python/mercurial 中找到了该模块,因此我将osutil.so 文件复制到了我的~data/mercurial-1.5/mercurial 目录中,仅此而已...但是越来越多的模块无法'找不到所以我决定将一个目录的全部内容复制到另一个目录,如下所示:

    $ rm -R ~/data/mercurial-1.5/mercurial/*
    $ cp -r ~/lib/python/mercurial/* ~/data/mercurial-1.5/mercurial
    

    现在,一切正常。我不明白为什么 mercurial 似乎安装在两个目录中,或者为什么一个目录 (~/data/mercurial-1.5/mercurial) 没有获得与另一个目录 (~/lib/python/mercurial) 相同的文件。

    无论如何,这是我想出的解决方案。如果你(或任何人)能想到更优雅的东西,我会全力以赴,但事实上......这个对我有用。

    感谢您的宝贵时间。

    【讨论】:

      猜你喜欢
      • 2011-03-17
      • 2014-04-05
      • 2011-06-02
      • 2013-10-18
      • 2014-11-20
      • 1970-01-01
      • 2013-03-23
      • 2012-09-04
      • 2020-09-26
      相关资源
      最近更新 更多