Feature Request: allow 'play war' to ignore specified subdirectories

Bug #505720 reported by Lawrence McAlpin
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Unassigned
1.1
Fix Committed
Undecided
Unassigned

Bug Description

The 'play war' command doesn't play nicely with my version control system. When I run 'play war', I get errors in calls to rmtree or copytree due to access violations trying to read files in the .svn subdirectories that Subversion litters my projects with.

As a workaround, of course, I am simply not versioning the directories it needs to export. However, it would be nice to be able to version everything, using the tool of my choice, and still be able to export my play projects.

It would be nice to have a feature that lets us pass an optional parameter in to the 'play war' command that would ignore specified directories that we do not want exported to the war. (Python 2.6 introduces an ignore parameter to copytree that could be useful for implementing this feature.)

Revision history for this message
Lawrence McAlpin (lmcalpin) wrote :

I should add that the directory that was particularly annoying me was the 'war' directory for GAE-enabled play apps. Because I had to modify the appengine-web.xml I wanted it checked in, but that puts an .svn file in the directory, and that prevented me from exporting the project successfully.

Revision history for this message
Roch Delsalle (mnml) wrote :

That would be a nice feature, for now you can use the "svn export" command it will copy your project without the .svn folder.

Revision history for this message
Guillaume Bort (guillaume-bort) wrote :

Now the war command will ignore hidden files like .svn, .bzr and .git

Revision history for this message
Lee Breisacher (leeb-linkline) wrote :

I'm not sure this is completely fixed. I have 1.0-r863 and I get this when I try to war:

~ Packaging current version of the framework and the application to C:\US\WebApp
s\wars\stash ...
Traceback (most recent call last):
  File "C:\java\PlayFramework\play", line 487, in <module>
    shutil.rmtree(os.path.join(war_path, 'WEB-INF/application/war'))
  File "C:\java\PlayFramework\python\lib\shutil.py", line 169, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "C:\java\PlayFramework\python\lib\shutil.py", line 174, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "C:\java\PlayFramework\python\lib\shutil.py", line 172, in rmtree
    os.remove(fullname)
WindowsError: [Error 5] Access is denied: 'C:\\US\\WebApps\\wars\\stash\\WEB-INF
/application/war\\.svn\\entries'

Revision history for this message
Mathias Bogaert (m-bogaert) wrote :

Same here. 1.1-r1038 is still packaging .svn directories.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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