Bazaar Explorer causes Maven clean builds to fail

Bug #880896 reported by Rares Boian
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Confirmed
High
Unassigned

Bug Description

While having a branch open on Bazaar Explorer I started a Maven clean build (mvn clean install). The Maven build then complained about being unable to delete an unversioned directory, and Bazaar Explorer threw the error below.

    Traceback (most recent call last):
      File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\view_workingtree.py", line 141, in refresh_view
      File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\view_workingtree.py", line 115, in _add_file_watcher_paths
      File "bzrlib\osutils.pyo", line 1808, in _walkdirs_utf8
      File "_walkdirs_win32.pyx", line 227, in bzrlib._walkdirs_win32.Win32ReadDir.read_dir (bzrlib\_walkdirs_win32.c:1837)
    WindowsError: [Error 5] D:/work/branch/target/classes/my/domain/myproject/export/annotations/*

This behavior appeared in version 1.2, and it looks like it is caused by the automatic refresh. I did go to Options -> Behavior and unchecked "Automatically refresh status report" but it had no effect. Having my builds fail or having to start/stop Bazaar Explorer all the time make me stay with version 1.1.4 for now.

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

As you can reliably reproduce this with 1.2, can get the section of .bzr.log (running `bzr version` will tell you where to find it) that the error occurs in and attach it to this bug?

Looks similar to other bugs related to the file watcher, but probably caused here by maven and bzr-explorer disagreeing about who gets to lock what.

Changed in bzr-explorer:
status: New → Incomplete
Revision history for this message
Rares Boian (rares-boian) wrote :

Steps to reproduce the bug:

1. Open in Bazaar Explorer the branch D:/work/branch

2. Run in D:\work\branch "mvn clean install". This attempts to delete a lot
   of directories named "target", which were previously detected by
   Bazaar Explorer as Unversioned

3. Maven stops with the error below

   [INFO] Failed to clean project: Failed to delete D:\work\branch\target\classes\my\domain\myproject\export

4. .bzr.log shows the error below

   8.423 Traceback (most recent call last):
     File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\view_workingtree.py", line 141, in refresh_view
     File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\view_workingtree.py", line 115, in _add_file_watcher_paths
     File "bzrlib\osutils.pyo", line 1808, in _walkdirs_utf8
     File "_walkdirs_win32.pyx", line 227, in bzrlib._walkdirs_win32.Win32ReadDir.read_dir (bzrlib\_walkdirs_win32.c:1837)
   WindowsError: [Error 5] D:/work/branch/target/classes/my/domain/myproject/export/annotations/*

5. Bazaar Explorer shows an error dialog with the content below

   bzr: ERROR: [Error 5] D:/work/branch/target/classes/my/domain/myproject/export/annotations/*

6. Click "Ignore" In the error dialog

7. Repeat step 2 multiple times. The Maven build keeps stopping with the
   error below, but there are no errors logged in .bzr.log and Bazaar
   Explorer shows no error dialogs. Closing the branch tab in Bazaar
   Explorer has no effect, as the build keeps failing to delete the same
   directory. Only when Bazaar Explorer is stopped does the build work
   again.

   [INFO] Failed to clean project: Failed to delete D:\work\branch\target\generated-sources

Bazaar version:

  Bazaar (bzr) 2.5b4
  Python interpreter: C:\Programs\x86\Bazaar\python26.dll 2.6.6
  Python standard library: C:\Programs\x86\Bazaar\lib\library.zip
  Platform: Windows-7-6.1.7601-SP1
  bzrlib: C:\Programs\x86\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:/Users/rares/AppData/Roaming/bazaar/2.0
  Bazaar log file: C:\Users\rares\Documents\.bzr.log

Bazaar Explorer version:

  1.2.1 "Leif Ericson"
  QBzr 0.22.0dev, bzrlib 2.5b4, PyQt 4.8.4, Qt 4.7.2, Python 2.6.6

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

Thanks for the detailed steps to reproduce Rares, if these are all unversioned directories it seems like Bazaar Explorer should simply not be tracking them for contents changes.

description: updated
tags: added: filewatcher win32
Changed in bzr-explorer:
importance: Undecided → High
status: Incomplete → Confirmed
Revision history for this message
Goldorak (yaneric-roussel) wrote :

One way to reproduce this bug:

- Create a new folder "folder"
- Inside this folder, create a new folder "subfolder"
- Delete "folder"
- Windows7 warn that administrator priviledge are required.
- If I do "Shift-Delete" (permament delete), Bazaar pop-up his error dialog (Error 5). In bzr.log I can see the exact same stack as Rares Boian.

If I quit bazaar, I can delete "folder" without problem.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Please, test new Bazaar Explorer 1.2.2 release, and tell us whether the problem still exists.

Revision history for this message
Goldorak (yaneric-roussel) wrote :

With 1.2.2 I'm not able to reproduce my subfolder problem.

I like a lot the 2.5 series and because of this fix I won't have to return to 2.3...

Thanks a lot!

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 880896] Re: Bazaar Explorer causes Maven clean builds to fail

Goldorak пишет:
> With 1.2.2 I'm not able to reproduce my subfolder problem.
>
> I like a lot the 2.5 series and because of this fix I won't have to
> return to 2.3...

Bazaar Explorer 1.2.2 is compatible with bzr 2.4 series, too.

--
All the dude wanted was his rug back

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.