Failure to "bzr merge -r X..Y filename" on Windows

Bug #478047 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin Packman
2.1
Fix Released
Medium
Martin Packman

Bug Description

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm not sure what is going wrong, but I was trying to revert a change to
a file. On Windows I get a failure when trying to do:

$ bzr merge -r 4478..4477 bzrlib/lock.py
 M bzrlib/lock.py
Text conflict in bzrlib/lock.py
bzr: ERROR: [Error 32] The process cannot access the file because it is
being used by another process

Note that if I just do:

$ bzr merge -r 4478..4477 .
 M NEWS
 M bzrlib/lock.py
Text conflict in NEWS
Text conflict in bzrlib/lock.py
2 conflicts encountered.

It works just fine (except for the conflicts).

I'm guessing that the former method leaves a file handle open, and
expects the garbage collector to clean it up. And we get to the
'finalize' portion of the code before that happens.

John
=:->

  affects bzr
  status confirmed
  importance medium
  tags win32
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr2UikACgkQJdeBCYSNAAPIcgCgoZxsbr+xiCqqA9WiCpCxBUAK
A0sAmQF9zKs3KYzkNAwwBGVx79Fcu4Bu
=WEKF
-----END PGP SIGNATURE-----

Related branches

Revision history for this message
Martin Packman (gz) wrote :

This is indeed about leaving files around without closing them, with filehack I get this:

Unclosed file: u'%TMP%/testbzr-dwm89j.tmp/_merge_reversed_revision_range/work/a'
  File ".\bzrlib\commands.py", line 1140, in run_bzr_catch_user_errors
    return run_bzr(argv)
  File ".\bzrlib\commands.py", line 1038, in run_bzr
    ret = run(*run_argv)
  File ".\bzrlib\commands.py", line 655, in run_argv_aliases
    return self.run(**all_cmd_args)
  File ".\bzrlib\builtins.py", line 3692, in run
    possible_transports=possible_transports)
  File ".\bzrlib\bundle\__init__.py", line 49, in read_mergeable_from_url
    _do_directive)
  File ".\bzrlib\bundle\__init__.py", line 71, in read_mergeable_from_transport
    redirected_transport)
  File ".\bzrlib\transport\__init__.py", line 1644, in do_catching_redirections
    return action(transport)
  File ".\bzrlib\bundle\__init__.py", line 59, in get_bundle
    return transport.get(filename), transport
  File ".\bzrlib\transport\local.py", line 163, in get
    return open(path, 'rb')

Have a fix for this I'll post shortly.

Revision history for this message
Martin Packman (gz) wrote :

Merged in r4853 - this bug probably wants the milestone setting to something too but I don't see how.

Changed in bzr:
assignee: nobody → Martin [gz] (gz)
status: Confirmed → Fix Released
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.1.0b4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.