Ignore .svn folders when building the war

Bug #548757 reported by ArnaudT
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Fix Committed
Undecided
Erwan Loisant
1.0
Won't Fix
Undecided
Unassigned
1.1
Fix Committed
Low
Erwan Loisant

Bug Description

svn folders are build with the wars, causing the following error (on windows):

~
~ Packaging
~ ---------
~ Packaging current version of the framework and the application to c:
\users\arnaud\appdata\local\temp\flashSca.war ...
Traceback (most recent call last):
  File "D:\Developer\Play\1.1\play", line 1490, in <module>
    execfile(commands)
  File "D:\Developer\Play\1.1\modules\gae-1.0.2\commands.py", line 65,
in <module>
    package_as_war(war_path, None)
  File "D:\Developer\Play\1.1\play", line 849, in package_as_war
    if os.path.exists(war_path): shutil.rmtree(war_path)
  File "D:\Developer\Play\1.1\python\lib\shutil.py", line 169, in
rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "D:\Developer\Play\1.1\python\lib\shutil.py", line 169, in
rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "D:\Developer\Play\1.1\python\lib\shutil.py", line 169, in
rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "D:\Developer\Play\1.1\python\lib\shutil.py", line 174, in
rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "D:\Developer\Play\1.1\python\lib\shutil.py", line 172, in
rmtree
    os.remove(fullname)
WindowsError: [Error 5] AccÞs refus: 'c:\\users\\arnaud\\appdata\\local
\\temp\\flashSca.war\\WEB-INF\\application\\.svn\\dir-prop-base'

The solution is to ignore .svn folders when copy application to destination dir before building the war.
Maybe on ligne 864 in play python script

There is a new feature in python 2.6 to ignore foders during copytree but Play use 2.5 ... Is it difficult to migrate to 2.6 ?
shutil.ignore_patterns(*patterns)
This factory function creates a function that can be used as a callable for copytree()‘s ignore argument, ignoring files and directories that match one of the glob-style patterns provided. See the example below.

Tags: svn war
Erwan Loisant (eloisant)
Changed in play:
assignee: nobody → Erwan Loisant (eloisant)
status: New → Fix Committed
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.