Tuesday Feb 12, 2008

Working with NetBeans Mercurial Repository

Just back from snowboarding. I tried to hg pull -uv to update to the latest code base of NetBeans, but got:

** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial@selenic.com
** Mercurial Distributed SCM (version 0.9.4)
Traceback (most recent call last):
  File "/opt/local/bin/hg", line 11, in ?
    mercurial.commands.run()
  File "/opt/local/lib/python2.4/site-packages/mercurial/commands.py", line 3110, in run
    sys.exit(dispatch(sys.argv[1:], argv0=sys.argv[0]))
  File "/opt/local/lib/python2.4/site-packages/mercurial/commands.py", line 3107, in dispatch
    return cmdutil.runcatch(u, args, argv0=argv0)
  File "/opt/local/lib/python2.4/site-packages/mercurial/cmdutil.py", line 37, in runcatch
    return dispatch(ui, args, argv0=argv0)
  File "/opt/local/lib/python2.4/site-packages/mercurial/cmdutil.py", line 364, in dispatch
    ret = runcommand(ui, options, cmd, d)
  File "/opt/local/lib/python2.4/site-packages/mercurial/cmdutil.py", line 417, in runcommand
    return checkargs()
  File "/opt/local/lib/python2.4/site-packages/mercurial/cmdutil.py", line 373, in checkargs
    return cmdfunc()
  File "/opt/local/lib/python2.4/site-packages/mercurial/cmdutil.py", line 356, in 
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "/opt/local/lib/python2.4/site-packages/mercurial/commands.py", line 2063, in pull
    return postincoming(ui, repo, modheads, opts['update'])
  File "/opt/local/lib/python2.4/site-packages/mercurial/commands.py", line 2001, in postincoming
    return hg.update(repo, repo.changelog.tip()) # update
  File "/opt/local/lib/python2.4/site-packages/mercurial/hg.py", line 248, in update
    stats = _merge.update(repo, node, False, False, None, None)
  File "/opt/local/lib/python2.4/site-packages/mercurial/merge.py", line 541, in update
    checkunknown(wc, p2)
  File "/opt/local/lib/python2.4/site-packages/mercurial/merge.py", line 65, in checkunknown
    for f in wctx.unknown():
  File "/opt/local/lib/python2.4/site-packages/mercurial/context.py", line 413, in unknown
    def unknown(self): return self._status[4]
  File "/opt/local/lib/python2.4/site-packages/mercurial/context.py", line 369, in __getattr__
    self._status = self._repo.status()
  File "/opt/local/lib/python2.4/site-packages/mercurial/localrepo.py", line 864, in status
    list_ignored, list_clean)
  File "/opt/local/lib/python2.4/site-packages/mercurial/dirstate.py", line 445, in status
    for src, fn, st in self.statwalk(files, match, ignored=list_ignored):
  File "/opt/local/lib/python2.4/site-packages/mercurial/dirstate.py", line 421, in statwalk
    sorted_ = [ x for x in findfiles(f) ]
  File "/opt/local/lib/python2.4/site-packages/mercurial/dirstate.py", line 382, in findfiles
    if not ignore(np):
RuntimeError: internal error in regular expression engine

It was the second time I encountered this issue, I don't know why, so, I just upgraded my Mercurial from 0.9.4 to 0.9.5, and tried to get a new clone. I typed:

hg clone http://hg.netbeans.org

Everything seemed going smoothly, I had a new repository now. I copied my old hgrc to replace the un-configured one, and typed ant build, guess what? I got a lot of package javax.help does not exist, build failed. I knew that was because of that the binary files were not downloaded properly. It seemed I should leave the original hdrc there, and let ant hook the external.py. So I removed all extra lines except the original content of hgrc:

[paths]
default = http://hg.netbeans.org/main/

And tried ant build again, this time it went smoothly again.

LESSON: Do not modify hgrc before you do first "ant build", which will hook external.py and add "decode", "encode" automatically.

Comments:

It's late (1.30 am in Ireland) and you saved my bacon with this post - happy boarding :)

JR

Posted by John on February 15, 2008 at 01:53 AM PST #

Post a Comment:
Comments are closed for this entry.