[MERGE REVIEW] win32 tests

Alexander Belchenko bialix at ukr.net
Sun Mar 26 07:35:00 BST 2006


Aaron Bentley пишет:
> I've tried running the test suite under win32.  I've found a few bugs in
> bzr, and some in the test suite.  Patch attached, or see bzr.ab.
> 
> 1. The local transport was returning 0 from append, because tell doesn't
> work on a freshly-opened file.  Fixed by seeking.

Yes, this problem exists on windows.

> 2. ConfigObj opens files in text mode, causing them to be written with
> DOS line-endings on win32.  To date, all of our files have used Unix
> line endings, and I'd rather leave it that way.

+1

> 3. One test assumed the temp directory was /tmp/
> 
> 4. A couple of tests did mkdir(config_dir), instead of
> ensure_config_dir_exists, which creates *two* directories on win32.

+1

> 5. Some tests expected os.getcwd to use '/' as a path separator.
> 
> 6. 'bzr missing' could not accept '.' as an argument.
> 
> 7. The instrumented ConfigObject's write method didn't a parameter.
> 
> 8. Some tests built trees using 'native' encoding, and then expected
> them to have unix file endings.
> 
> Why does build_tree default to 'native', anyway?  IMHO, it should write
> exactly the specified contents to disk.

Probably, it does.

> 53 tests aren't passing, but I think they may be due to path-length
> problems.  Some of our test names are very long, resulting in paths near
> 255 characters long.


> ------------------------------------------------------------------------
> 
> === modified file 'a/bzrlib/builtins.py'
> --- a/bzrlib/builtins.py	
> +++ b/bzrlib/builtins.py	
> @@ -2049,9 +2049,11 @@
>                  raise BzrCommandError("No missing location known or specified.")
>              print "Using last location: " + local_branch.get_parent()
>          remote_branch = bzrlib.branch.Branch.open(other_branch)
> -        remote_branch.lock_read()
> +        local_branch.lock_write()
> +        if remote_branch.base == local_branch.base:
> +            remote_branch = local_branch
>          try:
> -            local_branch.lock_write()
> +            remote_branch.lock_read()
>              try:
>                  local_extra, remote_extra = find_unmerged(local_branch, remote_branch)
>                  if (log_format == None):

This part of your patch refer to item 6 (above)? I think this is not 
win32-specific. But anyway +0.
For all other hunks of your patch: +1.

--
Alexander





More information about the bazaar mailing list