repository seemingly corrupted after "abort: Operation not permitted: 'path_to_directory' "

Matt Mackall mpm at selenic.com
Thu Aug 8 19:42:34 UTC 2013


On Thu, 2013-08-08 at 21:21 +0200, j. van den hoff wrote:
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/scmutil.py",  
> line 337, in __call__
>      util.unlink(f)
> OSError: [Errno 1] Operation not permitted: '/Users/vdh/scripts/util/sd'
> abort: Operation not permitted: '/Users/vdh/scripts/util/sd'
> 8<----------------------------------------------------------------------
> the error occuring in `util.unlink' hints at a permission problem in the  
> working copy, I guess? but the subdirectory in question does not have
> any "wrong" permissions.

Ahh.

a) you're trying to replace a directory with a file of the same name
b) Mercurial is trying to delete the directory with unlink() rather than
rmdir()
c) you're apparently using OS X, which is based on BSD
d) BSD used to stupidly think that removing a directory with unlink is
ok if you're root
e) Therefore you get a misleading EPERM (Operation not permitted) rather
than EISDIR (Is a directory)

Step (b) is perhaps our oldest open bug:

http://bz.selenic.com/show_bug.cgi?id=29

..which hasn't really attracted much attention since people don't
encounter this much.

Moving the directory aside will let you make forward progress.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list