Abort: no match found!

Brad Miller bonelake at gmail.com
Tue Mar 11 14:00:58 CDT 2008


On Mar 11, 2008, at 11:26 AM, Matt Mackall wrote:

> Brad Miller wrote:
>> On Mar 10, 2008, at 8:14 PM, Matt Mackall wrote:
>>>
>>> On Mon, 2008-03-10 at 16:35 -0500, Brad Miller wrote:
>>>> After removing via hg rm  a couple of large directories  from my
>>>> project today I now get the following error message when I try to
>>>> commit or stat my project.
>>>>
>>>> bmiller at cray> hg stat
>>>> abort: No match found!
>>>
>>> Run that again with --traceback and --debug, please.
>>>
>> Here you go:
>> bmiller at cray> hg  
>> stat                                                        ~/ 
>> Classes/Software
>> abort: No match found!
>> [255] bmiller at cray> hg stat --traceback -- 
>> debug                              ~/Classes/Software
>> Traceback (most recent call last):
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/dispatch.py", line 45, in _runcatch
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/dispatch.py", line 364, in _dispatch
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/dispatch.py", line 417, in _runcommand
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/dispatch.py", line 373, in checkargs
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/dispatch.py", line 356, in <lambda>
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/commands.py", line 2536, in status
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/localrepo.py", line 1015, in status
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/context.py", line 252, in cmp
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/context.py", line 184, in __getattr__
>>  File "/Library/Python/2.5/site-packages/lib/python2.5/site- 
>> packages/mercurial/revlog.py", line 862, in lookup
>> LookupError: No match found
>> abort: No match found!
>
> Ahh. I lied. This probably /is/ related to the verify problem. It's  
> trying to compare the contents of a file in the working directory  
> with a file in the repo and not finding it in the repo. Not a very  
> useful message.
>
> $ hg clone hg hg-break
> 725 files updated, 0 files merged, 0 files removed, 0 files unresolved
> $ cd hg-break
> $ touch hg
> $ rm .hg/store/data/hg.i
> $ hg st
> abort: No match found!
>
> With this patch (quite probably mangled as it's the first one I've  
> tried sending with Thunderbird):
>
> diff -r 210ee6204a29 mercurial/revlog.py
> --- a/mercurial/revlog.py	Mon Mar 10 02:54:37 2008 -0500
> +++ b/mercurial/revlog.py	Tue Mar 11 11:23:56 2008 -0500
> @@ -859,7 +859,11 @@
>         if n:
>             return n
>
> -        raise LookupError(id, _("No match found"))
> +        if isinstance(id, str) and len(id) == 20:
> +            id = short(id)
> +
> +        raise LookupError(id, _("No match found for '%s' in %s") %
> +                          (id, self.indexfile))
>
>     def cmp(self, node, text):
>         """compare text with a given file revision"""
>
> ..we instead get:
>
> $ hg st
> abort: No match found for 'e48ab706a921' in data/hg.i!
>
> Have you confirmed that the files mentioned by verify are missing?

Yes I can confirm that they are missing.

Now for the truly strange part...

I applied the patch you sent and ran hg stat on the repository using  
the hg I had made using make local.   stat ran without error!

So I tried running my installed hg, again no errors.  Suddenly the  
repository shouts "I'M HEALED!" and commit works as well.   Running  
verify on the repo still reports the same errors.   And stat does not  
Give the error message you added in the patch.

checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
  .DS_Store at 0: empty or missing revlog
  ClassPlan.oo3/.OABK at 0: empty or missing revlog
  Code/jPhoto/Library/.DS_Store at 0: empty or missing revlog
  ExternalResources/corejava/.DS_Store at 0: empty or missing revlog
1799 files, 50 changesets, 1899 total revisions
4 integrity errors encountered!


So my repository really isn't healed, and I'm wondering when things  
will go bad again.

The repository has certainly been moved around as I've upgraded  
machines since this repo starting in July 2006.  But there are dot  
files that have been around for a very long time and I think would  
have been before and after any big movements.

Brad








More information about the Mercurial mailing list