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

Matt Mackall mpm at selenic.com
Thu Aug 8 22:11:44 UTC 2013


On Thu, 2013-08-08 at 22:29 +0200, j. van den hoff wrote:

> > Moving the directory aside will let you make forward progress.
> 
> you mean, starting from tip, renaming it with `hg mv', committing the  
> rename and
> then doing the update to the ancient revision?

Or just removing it without involving hg.

> another question: apart from the whole transaction failing (and the error  
> message being not helpful under macosx), it concerns me that after the  
> failure everything
> seems to be quite thoroughly messed up in assorted parts of the working  
> copy (not at all only in the affected directory)

The problem here is that 'update' is not a transaction and it's not even
trying to be a transaction. There is no attempt to "roll back" when an
update gets interrupted, nor is such a roll back generally possible
because we don't keep backups of all the things we might be clobbering
and some things we might be clobbering actually can't be backed up
(unreadable files) or restored (foreign ownership). Nor do filesystems
generally support anything vaguely resembling any of the atomicity
guarantees we'd need to do this even remotely right. Also, it'd be
much slower.

The price of that is that interrupted updates do indeed look messy.

Generally speaking, another update will fix things up, provided you
remove the problem that blocked the first update, so this ends up being
a fairly minor problem.

The latest Mercurial will tell you when you're in this "interrupted
update" state and prevent you from trying to do other things until you
fix it.

-- 
Mathematics is the supreme nostalgia of our time.






More information about the Mercurial mailing list