repository seemingly corrupted after "abort: Operation not permitted: 'path_to_directory' "
j. van den hoff
veedeehjay at googlemail.com
Thu Aug 8 19:21:16 UTC 2013
On Thu, 08 Aug 2013 19:13:04 +0200, Matt Mackall <mpm at selenic.com> wrote:
> On Thu, 2013-08-08 at 18:29 +0200, j. van den hoff wrote:
>> hi list,
>>
>> first time in several years of (not too fancy) hg usage that seemingly
>> something really bad happened.
>>
>> a) the setup:
>> I have a repository (purely local, not connected to any other repo,
>> backup
>> is done otherwise...) containing a modestly deep file tree with some
>> hundred files, mostly shell scripts. the repo is 3 years old with some
>> 500
>> revisions over all. over time there has been substantial restructuring
>> done, all with `hg mv' as far as I recall. moreover, there are a bunch
>> of
>> untracked files in the tree (test files etc.)
>>
>> b) problem 1 (the small one):
>> when trying to do `hg up' to some quite old revision I get an abort due
>> to
>> some untracked file not matching to earlier state of repo (to something
>> to
>> that extent). question: what is that about? why does mercurial care
>> about
>> some untracked file at all and does not leave it alone?
>
> You asked it to do something that would have overwritten the file.
> Mercurial can't distinguish "extremely valuable but haven't checked in
> yet" from "worthless".
yes, the latter is obvious. the former was not but now I see that in that
very old revision accidentally another silly test file of the same
silly name ("tt2") still was tracked (and some time later hg rm'ed)
which indeed would have overwritten the currently untracked file of the
same
name. so the behavior sure is correct but the error message was not clear
to me (it only referred to the untracked file, not stating something like
"file name collision: tt2 part of checkin XXX while not tracked in checkin
YYY").
anyway thanks for the clarification.
>
>> c) problem 2 (the BIG one):
>> after getting rid of problem 1 I restored the repo + working copy from
>> yesterdays backup (just to make sure that I start over with a definitely
>> uncorrupted setup) and tried again to `hg up' to the old revision. this
>> failed with "abort: Operation not permitted: 'path_to_directory'"
>
> Do this again with --traceback and send us the full output.
did not no of that option, thank you:
8<----------------------------------------------------------------------
Traceback (most recent call last):
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 97, in _runcatch
return _dispatch(req)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 778, in _dispatch
cmdpats, cmdoptions)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 549, in runcommand
ret = _runcommand(ui, options, cmd, d)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/extensions.py",
line 188, in wrap
return wrapper(origfn, *args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hgext/pager.py",
line 132, in pagecmd
return orig(ui, options, cmd, cmdfunc)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/extensions.py",
line 188, in wrap
return wrapper(origfn, *args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hgext/color.py",
line 405, in colorcmd
return orig(ui_, opts, cmd, cmdfunc)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 869, in _runcommand
return checkargs()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 840, in checkargs
return cmdfunc()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 775, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py",
line 506, in check
return func(*args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/extensions.py",
line 143, in wrap
util.checksignature(origfn), *args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py",
line 506, in check
return func(*args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hgext/mq.py",
line 3528, in mqcommand
return orig(ui, repo, *args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py",
line 506, in check
return func(*args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/commands.py",
line 5818, in update
ret = hg.update(repo, rev)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/hg.py",
line 463, in update
stats = updaterepo(repo, node, False)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/hg.py",
line 459, in updaterepo
return mergemod.update(repo, node, False, overwrite, None)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/merge.py",
line 748, in update
stats = applyupdates(repo, actions, wc, p2, pa, overwrite)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/merge.py",
line 493, in applyupdates
for i, item in prog:
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/merge.py",
line 414, in getremove
wwrite(f, fctx(f).data(), arg[2][0])
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/localrepo.py",
line 796, in wwrite
self.wopener.write(filename, data)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/scmutil.py",
line 228, in write
fp = self(path, 'wb')
File
"/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.
I'm sorry that I cannot be more specific -- the repo in question has
served some years as a container for a rather big pile of mostly unrelated
scripts so that's why I have difficulties in locating the problem. any
pointer where to look would be appreciated.
regards,
joerg
>
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Mercurial
mailing list