【发布时间】:2014-03-12 20:42:35
【问题描述】:
当我尝试更改我所在的分支时,每次都会收到此错误:
# Just check in which branch I am
$ hg branch
django1.6
$ hg update --clean default
abandon: Unlinking directory not permitted: 'D:\Projects\abc\abc'
(abc 是项目名称,此处为简单起见替换)。因为它是一个名为 abc 的 Django 项目,所以我在 django1.6 分支中创建了一个子文件夹 abc。此文件夹默认分支中尚不存在,所以如果我要更改分支,理论上必须删除该文件夹
当我检查属性时,我看到文件夹处于只读模式,所以在 cygwin 中我 chmod 文件夹并重试...
$ chmod -R 0777 hstareal/
$ hg update --clean default
abandon: Unlinking directory not permitted: 'D:\Projects\abc\abc'
$ hg update --clean another-already-existing-branch
abandon: Unlinking directory not permitted: 'D:\Projects\abc\abc'
有关信息,我可以创建一个分支并毫无问题地返回django1.6:
$ hg branch test
marked working directory as branch test
(branches are permanent and global, did you want a bookmark?)
$ hg update --clean django1.6
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
有人知道问题出在哪里吗?我确定这与cygwin有关,但我不明白为什么。
【问题讨论】:
标签: mercurial cygwin branch unlink