3

I have an app.yaml skip_files element as so:

skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$

How can I list exactly what files are being skipped? I am using OSX so my find util does not have extended regular expressions as far as I am aware.

Dan
  • 3,966
  • 5
  • 28
  • 50

3 Answers3

2

Run appcfg.py with the option -v. This will show you every file being processed and tell you whether it has been skipped due to your skip_files or not.

David Underhill
  • 15,206
  • 7
  • 50
  • 61
  • Hah. I'd completely forgotten about that. Lots of other junk, though, but a good start. – Dave W. Smith Aug 25 '14 at 01:47
  • Not quite what I am looking for but it does give results – so thanks. I'll leave the question open for a bit longer to see if anyone has exactly what I am looking for. – Dan Aug 28 '14 at 11:06
  • 1
    Thanks, that was really nice of you to point out @halfer! Looks like the links on the site got changed up ... I've updated my profile. Thanks again! – David Underhill Oct 20 '14 at 18:46
  • Thanks ! That pointed out that my issue came from my `.git`directory… – Yohan G. Jul 26 '16 at 09:50
0

As the docs state: URL and file path patterns use POSIX extended regular expression syntax.

So you can use a POSIX regex tester to check if your regex expressions work as expected. E.g. http://www.rexv.org/

Peter Knego
  • 78,855
  • 10
  • 118
  • 147
  • Thanks for the link. Unfortunately it is not so practical for my situation. I would have to generate and then paste a list of all my source files into the website. I would much prefer a solution that ran on my computer and uses my source tree. My worst case solution is to create a python script to test the regexps against my source tree but I would much prefer a command line solution. – Dan Aug 23 '14 at 13:54
  • You can use OSX's `find` command: http://stackoverflow.com/questions/6844785/how-to-use-regex-with-find-command – Peter Knego Aug 23 '14 at 15:19
  • I tried that before posting the question but couldn't get it to work as I get the following error: `find: -regextype: unknown primary or operator`. – Dan Aug 23 '14 at 15:43
0

If your question is, "how do I ensure that I don't accidentally have files that will be skipped", then one approach would be to borrow code from the SDK and write a script. It looks like FileIterator (in google/appengine/tools/appcfg.py) does what you'd need. (The caveat, which I'm duty bound to report, is that FileIterator isn't a published API, and may change at the whim of the App Engine team.)

Understanding POSIX regular expressions might put your mind at ease. The list you show skips edit temporary files (1,2), .pyc and .pyo files (3), RCS files* (4), and any dotfiles (5).

* RCS is an old-school version control system. I only know one person who still uses it. If you're using git, then .git (and contents) is protected by the dotfiles pattern.

Dave W. Smith
  • 21,640
  • 4
  • 33
  • 38