[issue840] hg import patch fails under Python 2.3
Jim Hague
mercurial-bugs at selenic.com
Thu Nov 22 11:47:38 CST 2007
New submission from Jim Hague <jim.hague at acm.org>:
A named parameter to list.sort() causes hg import to throw when importing a
patch. The parameter name changed between Python 2.3 and 2.4.
Trivial fixing patch attached.
jim at snape:~/src/hg$ hg import ~/hg.patch
applying /home/jim/hg.patch
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 0.9.5)
Traceback (most recent call last):
File "../mercurial-0.9.5/hg", line 14, in ?
mercurial.dispatch.run()
File "mercurial/dispatch.py", line 20, in run
sys.exit(dispatch(sys.argv[1:]))
File "mercurial/dispatch.py", line 29, in dispatch
return _runcatch(u, args)
File "mercurial/dispatch.py", line 45, in _runcatch
return _dispatch(ui, args)
File "mercurial/dispatch.py", line 348, in _dispatch
ret = _runcommand(ui, options, cmd, d)
File "mercurial/dispatch.py", line 401, in _runcommand
return checkargs()
File "mercurial/dispatch.py", line 357, in checkargs
return cmdfunc()
File "mercurial/dispatch.py", line 340, in <lambda>
d = lambda: func(ui, repo, *args, **cmdoptions)
File "mercurial/commands.py", line 1624, in import_
fuzz = patch.patch(tmpname, ui, strip=strip, cwd=repo.root,
File "mercurial/patch.py", line 229, in patch
return internalpatch(patchname, ui, strip, cwd, files)
File "mercurial/patch.py", line 292, in internalpatch
ret = applydiff(ui, fp, files, strip=strip)
File "mercurial/patch.py", line 894, in applydiff
if x.startswith('\ '):
File "mercurial/patch.py", line 472, in apply
old = h.old(fuzzlen, toponly)
File "mercurial/patch.py", line 360, in findlines
cand.sort(sorter)
TypeError: sort() takes no keyword arguments
----------
files: hg-import.patch
messages: 4355
nosy: bearcave
priority: bug
status: unread
title: hg import patch fails under Python 2.3
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue840>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hg-import.patch
Type: application/octet-stream
Size: 829 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20071122/11141a4f/attachment.obj
More information about the Mercurial-devel
mailing list