tests/test-check-execute.t
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 11 Feb 2016 15:38:56 -0800
changeset 28205 53f42c8d5f71
parent 27569 b3eba79b7e04
child 29219 3c9066ed557c
permissions -rw-r--r--
verify: show progress while verifying dirlogs In repos with treemanifests, the non-root-directory dirlogs often have many more total revisions than the root manifest log has. This change adds progress out to that part of 'hg verify'. Since the verification is recursive along the directory tree, we don't know how many total revisions there are at the beginning of the command, so instead we report progress in units of directories, much like we report progress for verification of files today. I'm not very happy with passing both 'storefiles' and 'progress' into the recursive calls. I tried passing in just a 'visitdir(dir)' callback, but the results did not seem better overall. I'm happy to update if anyone has better ideas.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27569
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     1
#require test-repo execbit
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     2
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     3
  $ cd "`dirname "$TESTDIR"`"
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     4
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     5
look for python scripts without the execute bit
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     6
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     7
  $ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")'
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     8
  [1]
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     9
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    10
look for python scripts with execute bit but not shebang
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    11
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    12
  $ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")'
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    13
  [1]
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    14
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    15
look for shell scripts with execute bit but not shebang
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    16
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    17
  $ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")'
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    18
  [1]
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    19
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    20
look for non scripts with no shebang
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    21
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    22
  $ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")'
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    23
  [1]