Mercurial (hg) update error, abort: No such file or directory
Asked Answered
M

1

5

I am unable to update mercurial repos on my machine. I get the following error when I do an update hg up --traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in _runcatch
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 679, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 454, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 733, in _runcommand
    return checkargs()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 687, in checkargs
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 676, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 385, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 5131, in update
    ret = hg.update(repo, rev)
  File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 395, in update
    stats = mergemod.update(repo, node, False, False, None)
  File "/usr/lib/python2.7/dist-packages/mercurial/merge.py", line 554, in update
    stats = applyupdates(repo, action, wc, p2, pa, overwrite)
  File "/usr/lib/python2.7/dist-packages/mercurial/merge.py", line 329, in applyupdates
    subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), overwrite)
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 156, in submerge
    mctx.sub(s).get(r)
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 668, in get
    if self._svnversion >= (1, 5):
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 169, in __get__
    result = self.func(obj)
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 567, in _svnversion
    output, err = self._svncommand(['--version'], filename=None)
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 555, in _svncommand
    universal_newlines=True, env=env, **extrakw)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
abort: No such file or directory

I've tried to do rm -rf myrepo and then do hg clone ssh://[email protected]/myrepo but that command downloads the repo correctly but I get the same error when hg tries to update the repo to branch default, more specifically I get this:

destination directory: foo
requesting all changes
adding changesets
adding manifests
adding file changes
added 6270 changesets with 20990 changes to 3682 files
updating to branch default
abort: No such file or directory

with trackback, I get an error similar to what I was getting before. I have even tried to re-install mercurial on my system without any luck.

Can you please point to what is the problem. The repo head seems to be alright, (I can clone and update on other machines), and I am able to clone or update other hg repos on my system. Can this have anything to do with subrepos? The trackback suggests it.

My system details: 32-bit Ubuntu 11.10, running mercurial version 1.9.1.

Mancini answered 19/10, 2011 at 16:0 Comment(2)
What OS are those machines running? How deep is the directory structure you’re trying to clone into? Also the Mercurial users list may be a better venue for these kind of questions: mercurial.selenic.com/wiki/MailingLists#The_Mercurial_listAndry
Thanks Laurens, here's my system config: 32-bit Ubuntu 11.10, running mercurial 1.9.1. I don't know about the depth of the dir structure, but I'd imagine it's less than 15. I will post this in the hg maillist too.Mancini
M
9

It seems that the source repo has an svn subrepo, and you have no subversion client installed (or svn is not in the search path).

Mosesmosey answered 19/10, 2011 at 19:52 Comment(5)
Thanks! you are right! I just needed to install svn. Thanks again.Mancini
You should file a ticket for this in the Mercurial bug tracker! That error can be handled a lot better. mercurial.selenic.com/wiki/BugTrackerAndry
And it just got fixed. Mercurial 2.0 should have a better error message.Andry
Wow Laurens, thanks, I just saw this message, sorry about not doing it. But thanks for taking responsibilityMancini
Mercurial 2.1.1 has the same problem if there's a git subrepo and git is not installed.Component

© 2022 - 2024 — McMap. All rights reserved.