Strange mercurial behaviour

Mathieu Clabaut mathieu.clabaut at gmail.com
Wed Feb 7 08:17:51 UTC 2007


Mercurial doesn't always take its python component for the system wide
installation, pecularly if the current dir is a mercurial repository (old
crew in my case)

$cd ~
$hg version
Mercurial Distributed SCM (version 5b1f663ef86d)
$cd contrib/hg/crew-mirror/
hg version
Mercurial Distributed SCM (version unknown)

where contrib/hg/crew-mirror/ is an old version of crew

$hg pull -u
pulling from http://hg.intevation.org/mercurial/crew
searching for changes
adding changesets
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version unknown)
Traceback (most recent call last):
  File "/usr/bin/hg", line 11, in ?
    mercurial.commands.run()
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/commands.py", line
2970, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/commands.py", line
3194, in dispatch
    return d()
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/commands.py", line
3153, in <lambda>
    d = lambda: func(u, repo, *args, **cmdoptions)
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/commands.py", line
1933, in pull
    modheads = repo.pull(other, heads=revs, force=opts['force'])
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/localrepo.py", line
1254, in pull
    return self.addchangegroup(cg, 'pull', remote.url())
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/localrepo.py", line
1734, in addchangegroup
    if cl.addgroup(chunkiter, csmap, tr, 1) is None:
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/revlog.py", line
1183, in addgroup
    text = self.revision(chain)
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/revlog.py", line 921,
in revision
    text = self.patches(text, bins)
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/revlog.py", line 840,
in patches
    return mdiff.patches(t, pl)
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/demandimport.py",
line 71, in __getattribute__
    self._load()
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/demandimport.py",
line 46, in _load
    mod = _origimport(head, globals, locals)
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/mdiff.py", line 248,
in ?
    patches = mpatch.patches
  File "/home/clabaut/contrib/hg/crew-mirror/mercurial/demandimport.py",
line 72, in __getattribute__
    return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'patches'
transaction abort!
rollback completed


$which -a hg
/usr/bin/hg
./hg

What is strange is that mercurial use the modules in the current working
directory and not in the system wide directory.

-mathieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20070207/fe86ee7c/attachment-0002.html>


More information about the Mercurial mailing list