mercurial+OSX==失败?hg log abort:是一个目录

2024-09-28 22:20:04 发布

您现在位置:Python中文网/ 问答频道 /正文

$ mkdir foo
$ cd foo
$ hg init .
$ hg log
abort: Is a directory
$ hg history
abort: Is a directory

达尔文主机.本地9.6.1达尔文内核版本9.6.1:2008年12月10日星期三10:38:33;根部:xnu-1228.9.75~3/释放

^{pr2}$

(全部通过macports安装)

有什么想法?谷歌什么也没给我们。在

更新:

(作为根目录):

$ hg init /tmp/foo
$ cd /tmp/foo; hg log
(works)

(作为用户):

$ hg init /tmp/bar
$ cd /tmp/bar; hg log
abort: Is a directory

所以特拉维斯是对的(见评论)这看起来确实是个许可问题,但在哪里呢?这是Leopard的一个基本安装版本,而macport版本的python和mercurial的库存安装。我希望这不是mercurial的想法,当它有一个权限问题时,一个好的错误消息。在

第二次更新(来自以下dkbits建议):

$ sudo dtruss hg log
[snip]
...
stat("/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-   packages/mercurial/templates/gitweb\0", 0xBFFFC7DC, 0x1000)      = 0 0
open_nocancel("/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial/templates/gitweb\0", 0x0, 0x1B6)        = 3 0
fstat(0x3, 0xBFFFC900, 0x1B6)        = 0 0
close_nocancel(0x3)      = 0 0
write_nocancel(0x2, "abort: Is a directory\n\0", 0x16)       = 22 0

另外,temp目录是您预期的位置。权限看起来没问题。在


Tags: 版本log权限fooinitisbarcd
3条回答

https://www.mercurial-scm.org/bts/issue233开始,有一个有趣的回溯:

hg --traceback qpop
Traceback (most recent call last):
  [...]
  File "/export/home/bos/lib/python/mercurial/util.py", line 747, in o
    rename(mktempcopy(f), f)
  File "/export/home/bos/lib/python/mercurial/util.py", line 690, in mktempcopy
    fp.write(posixfile(name, "rb").read())
IOError: [Errno 21] Is a directory
abort: Is a directory

也许权限错误是你的临时文件夹?要找到temp dir,请执行。。在

^{pr2}$

它应该在/var/folders/[...]/[...]/-Tmp-/

同样受到上述链接的启发,你可以尝试跑步。。在

$ hg init /tmp/bar
$ cd /tmp/bar
$ hg --traceback log

这不是对您的问题的直接回答,但是我已经成功地使用了来自here的Mercurial预打包二进制文件,并在osx10.5上安装了标准的python2.5.1。在

$ mkdir foo
$ cd foo
$ hg init .
$ hg log
$ hg history

$ hg --version
Mercurial Distributed SCM (version 1.2.1)

$ python --version
Python 2.5.1

我发现了问题:

如果你把你的.hgrc符号链接到某个地方,就会导致这个问题。当然是mercurial中的一个bug(还有一个愚蠢的错误消息)。在

$ rm -f ~/.hgrc
$ hg init foo
$ cd foo
$ hg log

(工程)

^{pr2}$

(工程)

相关问题 更多 >