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

r18910:b52404a9 default
r21195:9336bc7d stable
Show More
test-schemes.t
59 lines | 1.0 KiB | text/troff | Tads3Lexer
$ "$TESTDIR/hghave" serve || exit 80
$ cat <<EOF >> $HGRCPATH
> [extensions]
> schemes=
>
> [schemes]
> l = http://localhost:$HGPORT/
> parts = http://{1}:$HGPORT/
> z = file:\$PWD/
> EOF
$ hg init test
$ cd test
$ echo a > a
$ hg ci -Am initial
adding a
invalid scheme
$ hg log -R z:z
abort: no '://' in scheme url 'z:z'
[255]
http scheme
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
$ hg incoming l://
comparing with l://
searching for changes
no changes found
[1]
check that {1} syntax works
$ hg incoming --debug parts://localhost
using http://localhost:$HGPORT/
sending capabilities command
comparing with parts://localhost/
query 1; heads
sending batch command
searching for changes
all remote heads known locally
no changes found
[1]
check that paths are expanded
$ PWD=`pwd` hg incoming z://
comparing with z://
searching for changes
no changes found
[1]
errors
$ cat errors.log
$ cd ..