[MERGE] Win32 fixes

Alexander Belchenko bialix at ukr.net
Sat Apr 22 01:20:39 BST 2006


Alexander Belchenko пишет:
> Aaron Bentley пишет:
>> On the subject of Windows, there's one bug I'm having a hell of a time
>> with.  It's a merge test: test_contents_merge2 -- it invokes diff3 on
>> files in a temp directory, then tries to delete the temp directory.
>>
>> shutil.rmtree fails to delete the BASE file, with permission denied, for
>> no good reason I can tell.  I can successfully remove it using os.remove
>> after the tests have completed.
> 
> AFAIK, often this bug appears on windows when file was not explicitly 
> closed and immediately try to remove. I hope this helps.

Yes. This is the root of problem. Patch with fix is attached. This bug 
with permission denied mask another reason to fails this test:

Traceback (most recent call last):
   File 
"E:\work\Python\bzr\bzr.dev.bialix.work\bzrlib\tests\test_merge_core.py", 
line 245, in test_contents_merge2
     self.do_contents_test(Diff3Merger)
   File 
"E:\work\Python\bzr\bzr.dev.bialix.work\bzrlib\tests\test_merge_core.py", 
line 278, in do_contents_test
     builder = self.contents_test_success(merge_factory)
   File 
"E:\work\Python\bzr\bzr.dev.bialix.work\bzrlib\tests\test_merge_core.py", 
line 298, in contents_test_success
     "a\nz\nc\nd\ne\nz\n")
AssertionError: 'a\r\nz\r\nc\r\nd\r\ne\r\nz\r\n' != 'a\nz\nc\nd\ne\nz\n'


I use diff3 ported to win32 from http://gnuwin32.sf.net. This program 
implicitly convert all line-endings to CRLF. What we should do with this 
ugliness?

--
Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: explicitly_close_file.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060422/c685f52f/attachment.diff 


More information about the bazaar mailing list