Details
Details
- Reviewers
durin42 - Group Reviewers
hg-reviewers - Commits
- rHG9afee647a9f0: flags: also test the removal of the exec flag
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- stable
- Lint
No Linters Available - Unit
No Unit Test Coverage
durin42 |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
> 8 | > 8 | ||||
> 9 | > 9 | ||||
> EOF | > EOF | ||||
$ touch b | $ touch b | ||||
$ hg add a b | $ hg add a b | ||||
$ hg commit -m "initial commit" | $ hg commit -m "initial commit" | ||||
$ cd .. | $ cd .. | ||||
$ hg init base-exec | |||||
$ cd base-exec | |||||
$ cat << EOF > a | |||||
> 1 | |||||
> 2 | |||||
> 3 | |||||
> 4 | |||||
> 5 | |||||
> 6 | |||||
> 7 | |||||
> 8 | |||||
> 9 | |||||
> EOF | |||||
$ chmod +x a | |||||
$ touch b | |||||
$ hg add a b | |||||
$ hg commit -m "initial commit" | |||||
$ cd .. | |||||
Testing merging mode change | Testing merging mode change | ||||
=========================== | =========================== | ||||
Adding the flag | |||||
--------------- | |||||
setup | setup | ||||
Change on one side, executable bit on the other | Change on one side, executable bit on the other | ||||
$ hg clone base-repo simple-merge-repo | $ hg clone base-repo simple-merge-repo | ||||
updating to branch default | updating to branch default | ||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd simple-merge-repo | $ cd simple-merge-repo | ||||
(branch merge, don't forget to commit) | (branch merge, don't forget to commit) | ||||
$ hg st | $ hg st | ||||
M a | M a | ||||
$ [ -x a ] || echo "executable bit lost" | $ [ -x a ] || echo "executable bit lost" | ||||
$ cd .. | $ cd .. | ||||
Removing the flag | |||||
----------------- | |||||
setup | |||||
Change on one side, executable bit on the other | |||||
$ hg clone base-exec simple-merge-repo-removal | |||||
updating to branch default | |||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||||
$ cd simple-merge-repo-removal | |||||
$ chmod -x a | |||||
$ hg ci -m "make a non-executable, no change" | |||||
$ [ -x a ] && echo "executable bit not removed" | |||||
[1] | |||||
$ hg up ".^" | |||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||||
$ cat << EOF > a | |||||
> 1 | |||||
> 2 | |||||
> 3 | |||||
> 4 | |||||
> 5 | |||||
> 6 | |||||
> 7 | |||||
> x | |||||
> 9 | |||||
> EOF | |||||
$ hg commit -m "edit end of file" | |||||
created new head | |||||
merge them (from the update side) | |||||
$ hg merge 'desc("make a non-executable, no change")' | |||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||||
(branch merge, don't forget to commit) | |||||
$ hg st | |||||
M a | |||||
$ [ -x a ] && echo "executable bit not removed" | |||||
[1] | |||||
merge them (from the chmod side) | |||||
$ hg up -C 'desc("make a non-executable, no change")' | |||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||||
$ hg merge 'desc("edit end of file")' | |||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||||
(branch merge, don't forget to commit) | |||||
$ hg st | |||||
M a | |||||
$ [ -x a ] && echo "executable bit not removed" | |||||
[1] | |||||
$ cd .. | |||||
Testing merging mode change with rename | Testing merging mode change with rename | ||||
======================================= | ======================================= | ||||
$ hg clone base-repo rename-merge-repo | $ hg clone base-repo rename-merge-repo | ||||
updating to branch default | updating to branch default | ||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd rename-merge-repo | $ cd rename-merge-repo | ||||