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

r19095:5cc71484 stable
r21195:9336bc7d stable
Show More
test-update-reverse.t
84 lines | 1.7 KiB | text/troff | Tads3Lexer
/ tests / test-update-reverse.t
$ hg init
$ touch a
$ hg add a
$ hg commit -m "Added a"
$ touch main
$ hg add main
$ hg commit -m "Added main"
$ hg checkout 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
'main' should be gone:
$ ls
a
$ touch side1
$ hg add side1
$ hg commit -m "Added side1"
created new head
$ touch side2
$ hg add side2
$ hg commit -m "Added side2"
$ hg log
changeset: 3:91ebc10ed028
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Added side2
changeset: 2:b932d7dbb1e1
parent: 0:c2eda428b523
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Added side1
changeset: 1:71a760306caf
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Added main
changeset: 0:c2eda428b523
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Added a
$ hg heads
changeset: 3:91ebc10ed028
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Added side2
changeset: 1:71a760306caf
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Added main
$ ls
a
side1
side2
$ hg update --debug -C 1
resolving manifests
branchmerge: False, force: True, partial: False
ancestor: 91ebc10ed028+, local: 91ebc10ed028+, remote: 71a760306caf
side1: other deleted -> r
side2: other deleted -> r
main: remote created -> g
removing side1
removing side2
updating: side2 2/3 files (66.67%)
getting main
updating: main 3/3 files (100.00%)
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ ls
a
main