##// 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:

r19846:97896709 stable
r21195:9336bc7d stable
Show More
test-propertycache.py.out
84 lines | 2.2 KiB | text/plain | TextLexer
/ tests / test-propertycache.py.out
=== property cache ===
calllog: []
cached value (unfiltered): NOCACHE
= first access on unfiltered, should do a call
access: 0
calllog: [0]
cached value (unfiltered): 0
= second access on unfiltered, should not do call
access 0
calllog: [0]
cached value (unfiltered): 0
= first access on "visible" view, should do a call
cached value ("visible" view): NOCACHE
access: 7
calllog: [0, 7]
cached value (unfiltered): 0
cached value ("visible" view): 7
= second access on "visible view", should not do call
access: 7
calllog: [0, 7]
cached value (unfiltered): 0
cached value ("visible" view): 7
= no effect on other view
cached value ("immutable" view): NOCACHE
access: 9
calllog: [0, 7, 9]
cached value (unfiltered): 0
cached value ("visible" view): 7
cached value ("immutable" view): 9
=== unfiltered property cache ===
unficalllog: []
cached value (unfiltered): NOCACHE
cached value ("visible" view): NOCACHE
cached value ("immutable" view): NOCACHE
= first access on unfiltered, should do a call
access (unfiltered): 100
unficalllog: [100]
cached value (unfiltered): 100
= second access on unfiltered, should not do call
access (unfiltered): 100
unficalllog: [100]
cached value (unfiltered): 100
= access on view should use the unfiltered cache
access (unfiltered): 100
access ("visible" view): 100
access ("immutable" view): 100
unficalllog: [100]
cached value (unfiltered): 100
cached value ("visible" view): NOCACHE
cached value ("immutable" view): NOCACHE
= even if we clear the unfiltered cache
cached value (unfiltered): NOCACHE
cached value ("visible" view): NOCACHE
cached value ("immutable" view): NOCACHE
unficalllog: [100]
access ("visible" view): 100
unficalllog: [100, 100]
cached value (unfiltered): 100
cached value ("visible" view): NOCACHE
cached value ("immutable" view): NOCACHE
access ("immutable" view): 100
unficalllog: [100, 100]
cached value (unfiltered): 100
cached value ("visible" view): NOCACHE
cached value ("immutable" view): NOCACHE
access (unfiltered): 100
unficalllog: [100, 100]
cached value (unfiltered): 100
cached value ("visible" view): NOCACHE
cached value ("immutable" view): NOCACHE