annotate tests/test-check-execute.t @ 29181:dae38633eba8 stable

localrepo: prevent executable-bit only changes from being lost on amend If you have just executable-bit change and amend it twice it will vanish: * After the first amend the commit will have the proper executable bit set in manifest but it won't have the the file on the list of files in changelog. * The second amend will read the wrong list of files from changelog and it will copy the manifest entry from parent for this file. * Voila! The change is lost. This change repairs the bug in localrepo causing this and adds a test for it.
author Mateusz Kwapich <mitrandir@fb.com>
date Thu, 19 May 2016 14:35:22 -0700
parents b3eba79b7e04
children 3c9066ed557c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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]