MERGE ping
Martin Pool
mbp at sourcefrog.net
Mon Apr 3 19:11:33 BST 2006
On 3 Apr 2006, at 22:54 , Aaron Bentley wrote:
>
>> @@ -48,8 +49,11 @@
>> See also bzr resolve.
>> """
>> def run(self):
>> - for path in
>> WorkingTree.open_containing(u'.')[0].iter_conflicts():
>> - print path
>> + from bzrlib.workingtree import WorkingTree
>> + from transform import conflicts_strings
*********
>> + wt = WorkingTree.open_containing(u'.')[0]
>> + for conflict in conflicts_strings(wt.conflict_lines()):
>> + print conflict
>>
>> Should be 'from bzrlib.transform'.
>
> Sorry, I don't follow.
This uses a relative import of 'transform', and will work if it's run
from a module in bzrlib, which it is at present. However I think
it's better style (and (at least ) consistent with what we already
have) to give the full module path -- explicit is better.
PEP328 (absolute vs relative imports) should be in Python 2.5 and
will allow disabling this behaviour.
http://www.python.org/dev/peps/pep-0328/
--
Martin Pool
More information about the bazaar
mailing list