1. Bryan O'Sullivan
  2. hgbook

Commits

Bryan O'Sullivan  committed 5cee648

Require examples to be executable, so it's easier to see them with "ls".

  • Participants
  • Parent commits e68f4a9
  • Branches default

Comments (0)

Files changed (7)

File en/examples/hook.simple

  • Ignore whitespace
File contents unchanged.

File en/examples/mq.diff

  • Ignore whitespace
File contents unchanged.

File en/examples/mq.qinit-help

  • Ignore whitespace
File contents unchanged.

File en/examples/mq.tarball

  • Ignore whitespace
File contents unchanged.

File en/examples/mq.tools

  • Ignore whitespace
File contents unchanged.

File en/examples/mq.tutorial

  • Ignore whitespace
File contents unchanged.

File en/examples/run-example

View file
  • Ignore whitespace
 import re
 import shutil
 import signal
+import stat
 import sys
 import tempfile
 import time
         if name == 'run-example' or name.startswith('.'): continue
         if name.endswith('.out') or name.endswith('~'): continue
         pathname = os.path.join(path, name)
-        if os.path.isfile(pathname):
+        st = os.lstat(pathname)
+        if stat.S_ISREG(st.st_mode) and st.st_mode & 0111:
             example(pathname).run()
     print >> open(os.path.join(path, '.run'), 'w'), time.asctime()