Argh!!!

Phillip Neiswanger sigsegv at prodigy.net
Wed Mar 14 16:18:49 CDT 2007


On Wed, 14 Mar 2007 12:51:06 -0600, Matt Mackall <mpm at selenic.com> wrote:

> On Wed, Mar 14, 2007 at 09:16:29AM -0600, Phillip Neiswanger wrote:
>> On Wed, 14 Mar 2007 01:18:48 -0600, Michael Smith
>> <michael.smith at thalesatm.com> wrote:
>>
>> >Phillip Neiswanger wrote:
>> >
>> >>I commit as root and the commit appears to work just fine.  By that I
>> >>mean  it didn't report any errors or die while trying to commit.
>> >>However, any  command that tries to work with the repository will
>> >>produce the error you  see at the beginning of this message.  Is there
>> >>anything that can be done  with the repository at this point?  I'm of
>> >>the opinion I should just  delete the .hg directory and  
>> init/add/commit
>> >>again.  I don't want to loose  all the history, but I can at least
>> >>continue if there's nothing that can  be done to reclaim the history.
>> >
>> >As root can you chown the whole repository and clone structure back to
>> >your user id?
>>
>> The only files that were owned by root were the following:
>>
>> .hg/dirstate
>> .hg/store/data/app/views/some_view/__partial__01.rhtml.i
>> .hg/store/data/public/stylesheets/some_view/partial__01.css.i
>> .hg/store/undo
>>
>> Changing ownership of those files did not correct the problem.
>> Interestingly, the ..partial.. files only exist in the .hg/store area of
>> the repository(?).  I had removed them from the working area of the
>> repository before commit'ing that final time.  Should I try removing  
>> those
>> files from the 'store' or would that make things worse?
>
> You should probably start by doing 'hg clone --pull broken backup'.
> Usually this will give you a clean repo. Then send the output of 'hg
> verify' on your broken repo.

All commands that try to make use of the repository no longer work, ie

prompt> hg clone --pull project project.backup
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 0.9.3)
Traceback (most recent call last):
   File "/usr/local/bin/hg", line 12, in ?
     commands.run()
   File "/usr/local/lib/python2.4/site-packages/mercurial/commands.py",  
line 3000, in run
     sys.exit(dispatch(sys.argv[1:]))
   File "/usr/local/lib/python2.4/site-packages/mercurial/commands.py",  
line 3223, in dispatch
     return d()
   File "/usr/local/lib/python2.4/site-packages/mercurial/commands.py",  
line 3184, in <lambda>
     d = lambda: func(u, *args, **cmdoptions)
   File "/usr/local/lib/python2.4/site-packages/mercurial/commands.py",  
line 406, in clone
     update=not opts['noupdate'])
   File "/usr/local/lib/python2.4/site-packages/mercurial/hg.py", line 99,  
in clone
     src_repo = repository(ui, source)
   File "/usr/local/lib/python2.4/site-packages/mercurial/hg.py", line 56,  
in repository
     repo = _lookup(path).instance(ui, path, create)
   File "/usr/local/lib/python2.4/site-packages/mercurial/localrepo.py",  
line 1968, in instance
     return localrepository(ui, util.drop_scheme('file', path), create)
   File "/usr/local/lib/python2.4/site-packages/mercurial/localrepo.py",  
line 103, in __init__
     self.manifest = manifest.manifest(self.sopener, v)
   File "/usr/local/lib/python2.4/site-packages/mercurial/manifest.py",  
line 44, in __init__
     defversion)
   File "/usr/local/lib/python2.4/site-packages/mercurial/revlog.py", line  
327, in __init__
     self.load()
   File "/usr/local/lib/python2.4/site-packages/mercurial/revlog.py", line  
383, in load
     self.parseindex(f, st)
   File "/usr/local/lib/python2.4/site-packages/mercurial/revlog.py", line  
423, in parseindex
     e = struct.unpack(self.indexformat, cur)
struct.error: unpack str size does not match format


and


prompt> hg verify
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 0.9.3)
Traceback (most recent call last):
   File "/usr/local/bin/hg", line 12, in ?
     commands.run()
   File "/usr/local/lib/python2.4/site-packages/mercurial/commands.py",  
line 3000, in run
     sys.exit(dispatch(sys.argv[1:]))
   File "/usr/local/lib/python2.4/site-packages/mercurial/commands.py",  
line 3172, in dispatch
     repo = hg.repository(u, path=path)
   File "/usr/local/lib/python2.4/site-packages/mercurial/hg.py", line 56,  
in repository
     repo = _lookup(path).instance(ui, path, create)
   File "/usr/local/lib/python2.4/site-packages/mercurial/localrepo.py",  
line 1968, in instance
     return localrepository(ui, util.drop_scheme('file', path), create)
   File "/usr/local/lib/python2.4/site-packages/mercurial/localrepo.py",  
line 103, in __init__
     self.manifest = manifest.manifest(self.sopener, v)
   File "/usr/local/lib/python2.4/site-packages/mercurial/manifest.py",  
line 44, in __init__
     defversion)
   File "/usr/local/lib/python2.4/site-packages/mercurial/revlog.py", line  
327, in __init__
     self.load()
   File "/usr/local/lib/python2.4/site-packages/mercurial/revlog.py", line  
383, in load
     self.parseindex(f, st)
   File "/usr/local/lib/python2.4/site-packages/mercurial/revlog.py", line  
423, in parseindex
     e = struct.unpack(self.indexformat, cur)
struct.error: unpack str size does not match format


It's quite foobar'd at this point.
--
phil



More information about the Mercurial mailing list