views:

85

answers:

1

I have added a line at the top of skip_files to make app engine deployment skip all files starting with .hg such as the .hgignore file and the .hg directory. Will this ignore the whole .hg directory and all its files and subdirectories?

skip_files: - ^(./)?.hg$

  • ^(.*/)?app.yaml
  • ^(.*/)?app.yml
  • ^(.*/)?index.yaml
  • ^(.*/)?index.yml
  • ^(./)?#.#
  • ^(./)?.~
  • ^(./)?..py[co]
  • ^(./)?./RCS/.*
  • ^(./)?..
+1  A: 

By default unix style hidden files and folders are skipped. In other words, any file starting with a dot (.) is already skipped. That is what the last line in your list would do if it did not have the missing * at the end (I assume the \s are actually there).

Your suggestion of: ^(.*/)?.hg$ is not quite right. To match any file starting with .hg you need ^(.*/)?\.hg.*.

You should read about regular expressions.

edit: adding dump from appcfg.py update -v .

Scanning files on local disk.
2010-10-10 17:14:07,244 INFO appcfg.py:1693 Ignoring directory '.hg': Directory matches ignore regex. 
2010-10-10 17:14:07,244 INFO appcfg.py:1686 Ignoring file '.hgignore': File matches ignore regex. 
Robert Kluin
Mercurial also has a folder called .hg My regex was hoping to catch the .hgignore file and the .hg directory and all its files. For example a file called undo.branch inside the .hg folder is actually called .hg\undo.branch which would be matched by my expression. In other words: anything *starting* with .hg must not be uploaded to Google.
Does app engine see .hg\undo.branch or does it see undo.branch? What does it pass to the regex subroutine?
Your suggested pattern would match something that ended in "hg". It will look at the path, so it will see '.hg/undo.branch'. The regex I suggested should catch anything starting with '.hg' then followed by zero or more characters. But, again, the default skip-files pattern should be skipping anything that starts with a period.
Robert Kluin
It doesn't appear to be uploading the files - but then I also don't know how to tell the GAE GUI to give me a verbose listing when it deploys. I certainly don't know how to "explore" the files uploaded to app engine to verify!
Run `appcfg.py update -v .` from the command line. That will give you verbose output. As you can see from my output, the default settings *will ignore* `.hg*`.
Robert Kluin