Checkin gives error "abort: There is noMercurialrepositoryhere (.hg not found)!" on TortoiseHg/Windows version

Matt Mackall mpm at selenic.com
Fri Nov 6 10:22:12 CST 2009


On Fri, 2009-11-06 at 15:56 +0100, jens.lund at nordea.com wrote:
> > From: Matt Mackall [mailto:mpm at selenic.com] 
> > On Fri, 2009-11-06 at 15:23 +0100, jens.lund at nordea.com wrote:
> > > > From: Benoit Boissinot [mailto:benoit.boissinot at ens-lyon.org] 
> > > > Ok, does hg --traceback give more information then?
> > > 
> > > A bit more:
> > > 
> > > g36565 at dkd1ws0030 ~/tmp/othertest/hgtest
> > > $ hg --traceback ci -m "Second version, fails"
> > > Traceback (most recent call last):
> > >   File "mercurial\dispatch.pyc", line 43, in _runcatch
> > >   File "mercurial\dispatch.pyc", line 441, in _dispatch
> > > RepoError: There is no Mercurial repository here (.hg not found)
> > > abort: There is no Mercurial repository here (.hg not found)!
> > 
> > Wow, that's broken.
> > 
> > What's happening is that when we're creating the repository 
> > object, it's
> > reporting a repository error (probably something like "interrupted
> > transaction") and we're swallowing that error and trying to 
> > guess where
> > the repo is. This all happens way before we even attempt the actual
> > second commit. So I would expect a bunch of other commands to also be
> > broken (status, parents, etc.).
> > 
> > What files are in your .hg directory?
> 
> ./.hg:
> total 8
> drwxr-xr-x 1 g36565 mkgroup-l-d  0 Nov  6 15:54 .
> drwxr-xr-x 1 g36565 mkgroup-l-d  0 Nov  6 15:51 ..
> -rw-r--r-- 1 g36565 mkgroup-l-d 57 Nov  6 15:50 00changelog.i
> -rw-r--r-- 1 g36565 mkgroup-l-d 69 Nov  6 15:51 dirstate
> -rw-r--r-- 1 g36565 mkgroup-l-d  7 Nov  6 15:54 journal.branch
> -rw-r--r-- 1 g36565 mkgroup-l-d 69 Nov  6 15:54 journal.dirstate
> -rw-r--r-- 1 g36565 mkgroup-l-d 23 Nov  6 15:50 requires
> drwxr-xr-x 1 g36565 mkgroup-l-d  0 Nov  6 15:54 store
> -rw-r--r-- 1 g36565 mkgroup-l-d  7 Nov  6 15:51 undo.branch
> -rw-r--r-- 1 g36565 mkgroup-l-d 69 Nov  6 15:51 undo.dirstate
> -rw-r--r-- 1 g36565 mkgroup-l-d 15 Nov  6 15:54 wlock

Hmm, a journal's getting created, but that shouldn't cause a problem
until much later. Your traceback indicates we're running into problems
quite early. It looks like the things that can cause an early bailout
are:

- repo not found (are you doing something interesting with shared
filesystems?)
- unexpected things in your requires file (can you send that?)
- unreachable shared path (doesn't apply)
- something interesting in an extension (using any?)

You might also try this patch:

diff -r ca24c862d915 mercurial/dispatch.py
--- a/mercurial/dispatch.py	Sat Oct 17 14:00:41 2009 -0400
+++ b/mercurial/dispatch.py	Fri Nov 06 10:11:59 2009 -0600
@@ -431,6 +431,7 @@
             ui.setconfig("bundle", "mainreporoot", repo.root)
         except error.RepoError:
             if cmd not in commands.optionalrepo.split():
+                raise
                 if args and not path: # try to infer -R from command args
                     repos = map(_findrepo, args)
                     guess = repos[0]



-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list