##// END OF EJS Templates
cmdserver: forcibly use L channel to read password input (issue3161)...
cmdserver: forcibly use L channel to read password input (issue3161) Command server is designed to use the channel protocol even if the server process is accessible to tty, whereas vanilla hg should be able to read password from tty in that case. So it isn't enough to swap sys.stdin: # works only if the server process is detached from the console sys.stdin = self.fin getpass.getpass('') sys.stdin = oldin or test isatty: # vanilla hg can't talk to tty if stdin is redirected if self._isatty(self.fin): return getpass.getpass('') else: ... Since ui.nontty flag is undocumented and command-server channels don't provide isatty(), this change won't affect the other uses of ui._isatty(). issue3161 also suggests to provide some context of messages. I think it can be implemented by using the generic templating function.

File last commit:

r21023:57b50abe default
r21195:9336bc7d stable
Show More
test-permissions.t
74 lines | 1.2 KiB | text/troff | Tads3Lexer
/ tests / test-permissions.t
Mads Kiilerich
tests: warn on invalid #if directive
r21023 #if unix-permissions no-root
Mads Kiilerich
tests: use 'hghave unix-permissions' for tests that really use chmod...
r15443
Adrian Buehlmann
combine tests
r12279 $ hg init t
$ cd t
$ echo foo > a
$ hg add a
$ hg commit -m "1"
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
$ chmod -r .hg/store/data/a.i
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg verify
Adrian Buehlmann
combine tests
r12279 checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Mads Kiilerich
tests: remove redundant globs...
r12640 abort: Permission denied: $TESTTMP/t/.hg/store/data/a.i
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Adrian Buehlmann
combine tests
r12279
$ chmod +r .hg/store/data/a.i
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg verify
Adrian Buehlmann
combine tests
r12279 checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
$ chmod -w .hg/store/data/a.i
$ echo barber > a
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg commit -m "2"
Adrian Buehlmann
combine tests
r12279 trouble committing a!
Mads Kiilerich
tests: remove redundant globs...
r12640 abort: Permission denied: $TESTTMP/t/.hg/store/data/a.i
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Adrian Buehlmann
combine tests
r12279
$ chmod -w .
$ hg diff --nodates
diff -r 2a18120dc1c9 a
--- a/a
+++ b/a
@@ -1,1 +1,1 @@
-foo
+barber
$ chmod +w .
$ chmod +w .hg/store/data/a.i
$ mkdir dir
$ touch dir/a
$ hg status
M a
? dir/a
$ chmod -rx dir
$ hg status
dir: Permission denied
M a
Reenable perm to allow deletion:
$ chmod +rx dir
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913 $ cd ..
Matt Mackall
tests: skip tests that require not having root (issue4089)...
r20008
#endif