Abort: no match found!

Matt Mackall mpm at selenic.com
Tue Mar 11 11:26:14 CDT 2008


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?

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list