Bug in util.py

Jun Inoue jun.lambda at gmail.com
Sun Oct 29 11:05:04 UTC 2006


Hi, I came across a bug in util.py.  I have a repo whose absolute path
is /home/dvl/repo.  There's a symlink /dvl -> /home/dvl, and if I open
a file in the repo with emacs through the symlink, the hg-diff-repo
command fails.  Apparently, when mercurial tries to figure out if
/dvl/repo is the same thing as /home/dvl/repo, samestat() tests true
on the first loop so `rel' never gets updated and os.path.join () gets
an empty parameter list.


Sample of error output:

Traceback (most recent call last):
  File "/usr/bin/hg", line 12, in ?
    commands.run()
  File "/var/lib/python-support/python2.4/mercurial/commands.py", line 3266, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/var/lib/python-support/python2.4/mercurial/commands.py", line 3465, in dispatch
    return d()
  File "/var/lib/python-support/python2.4/mercurial/commands.py", line 3424, in <lambda>
    d = lambda: func(u, repo, *args, **cmdoptions)
  File "/var/lib/python-support/python2.4/mercurial/commands.py", line 1414, in diff
    fns, matchfn, anypats = matchpats(repo, pats, opts)
  File "/var/lib/python-support/python2.4/mercurial/commands.py", line 50, in matchpats
    opts.get('exclude'), head)
  File "/var/lib/python-support/python2.4/mercurial/util.py", line 260, in cmdmatcher
    return _matcher(canonroot, cwd, names, inc, exc, head, dflt_pat, src)
  File "/var/lib/python-support/python2.4/mercurial/util.py", line 347, in _matcher
    name = canonpath(canonroot, cwd, name)
  File "/var/lib/python-support/python2.4/mercurial/util.py", line 241, in canonpath
    name = os.path.join(*rel)
TypeError: join() takes at least 1 argument (0 given)


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: util.py.diff
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20061029/26dcc7f5/attachment.diff>


More information about the Mercurial-devel mailing list