This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author benjamin.peterson
Recipients alejolp, benjamin.peterson
Date 2009-07-02.15:59:17
SpamBayes Score 2.4047178e-08
Marked as misclassified No
Message-id <1246550359.72.0.287086648133.issue6400@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the bug report! Fixed in r73771. Now when I run it on
mercurial/dispatch.py I get:

--- mercurial/dispatch.py (original)
+++ mercurial/dispatch.py (refactored)
@@ -5,11 +5,11 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
-from i18n import _
+from .i18n import _
 import os, sys, atexit, signal, pdb, socket, errno, shlex, time
-import util, commands, hg, fancyopts, extensions, hook, error
-import cmdutil, encoding
-import ui as _ui
+from . import util, commands, hg, fancyopts, extensions, hook, error
+from . import cmdutil, encoding
+from . import ui as _ui
 
 def run():
     "run the command in sys.argv"
@@ -486,7 +486,7 @@
             p.disable()
 
             if format == 'kcachegrind':
-                import lsprofcalltree
+                from . import lsprofcalltree
                 calltree = lsprofcalltree.KCacheGrind(p)
                 calltree.output(ostream)
             else:
RefactoringTool: Files that need to be modified:
RefactoringTool: mercurial/dispatch.py

Much better. :)

I'm glad to see someone is working on porting mercurial. You might want
to use the 2to3 development version, since it's always up to date wiht
bug fixes. [1] If you need any help, feel free to email the
python-porting list.

[1] http://svn.python.org/projects/sandbox/trunk/2to3
History
Date User Action Args
2009-07-02 15:59:20benjamin.petersonsetrecipients: + benjamin.peterson, alejolp
2009-07-02 15:59:19benjamin.petersonsetmessageid: <1246550359.72.0.287086648133.issue6400@psf.upfronthosting.co.za>
2009-07-02 15:59:18benjamin.petersonlinkissue6400 messages
2009-07-02 15:59:17benjamin.petersoncreate