I’m using the ‘Create Zip File’ action to archive selected files and directories from a section of a Subversion working copy. The problem I’m having is that zip is grabbing files from the hidden .svn directories. I cannot find an option to ignore hidden or system files/directories in the action.
Is the only option here to do an SVN Export to a temp folder, zip the temp folder and then delete it?
There are probably lots of workarounds. Some off the top of my head:
- Don’t use recurse, use a folder iterator to iterate over (non-hidden) folders and progressively build up the zip file
- Set the ‘archive’ bit on the non .svn directories and use ‘skip if archive bit not set’
- Use the ‘remove files’ to explicitly remove the ‘.svn’ directories - probably the cleanest solution
Steve
- Would using a folder iterator add relative paths to the zip file?
2. Changing bits on the .svn directories is not an option. The SVN client maintains those directories. If we delete the working copy and re-checkout then the bits we set/reset will be gone.
3. Adding .svn to the Exclude Files page does not work. It excludes files, not directories.
My current work-around is to use the SVN Export action to export the directory to %TEMP%, zip it from there, and then delete the exported directory. Not pretty, but it works.
- Not sure, you’d have to try it. Probably depends how you set it up.
2. I mean, explicitly set the bits just before the compression step.
3. I mean using the “Remove files” check box on the main screen, not the “Exclude files” tab.
Steve