我已经按照 MT 的知识库文件在这里安装了 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 问题,而更可能是安装问题。我真的很感激在这方面的任何帮助。提前致谢!