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

r16913:f2719b38 default
r21195:9336bc7d stable
Show More
test-hgcia.t
94 lines | 2.0 KiB | text/troff | Tads3Lexer
Matt Mackall
tests: unify test-hgcia
r12429 Test the CIA extension
$ cat >> $HGRCPATH <<EOF
> [extensions]
> hgcia=
>
> [hooks]
> changegroup.cia = python:hgext.hgcia.hook
>
Cédric Krier
hgcia: Handle URL like in notify (issue2406)...
r14314 > [web]
> baseurl = http://hgserver/
>
Matt Mackall
tests: unify test-hgcia
r12429 > [cia]
> user = testuser
> project = testproject
> test = True
> EOF
$ hg init src
$ hg init cia
$ cd src
$ echo foo > foo
$ hg ci -Amfoo
adding foo
$ hg push ../cia
pushing to ../cia
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
<message>
<generator>
<name>Mercurial (hgcia)</name>
<version>0.1</version>
<url>http://hg.kublai.com/mercurial/hgcia</url>
<user>testuser</user>
</generator>
<source>
<project>testproject</project>
<branch>default</branch>
</source>
<body>
<commit>
<author>test</author>
<version>0:e63c23eaa88a</version>
<log>foo</log>
Cédric Krier
hgcia: Set default value of strip to -1 (issue2891)...
r14850 <url>http://hgserver/rev/e63c23eaa88a</url>
<files><file uri="http://hgserver/file/e63c23eaa88a/foo" action="add">foo</file></files>
Matt Mackall
tests: unify test-hgcia
r12429 </commit>
</body>
<timestamp>0</timestamp>
</message>
Cédric Krier
hgcia: Set default value of strip to -1 (issue2891)...
r14850
$ cat >> $HGRCPATH <<EOF
> strip = 0
> EOF
$ echo bar > bar
$ hg ci -Ambar
adding bar
$ hg push ../cia
pushing to ../cia
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
<message>
<generator>
<name>Mercurial (hgcia)</name>
<version>0.1</version>
<url>http://hg.kublai.com/mercurial/hgcia</url>
<user>testuser</user>
</generator>
<source>
<project>testproject</project>
<branch>default</branch>
</source>
<body>
<commit>
<author>test</author>
<version>1:c0c7cf58edc5</version>
<log>bar</log>
<url>http://hgserver/$TESTTMP/cia/rev/c0c7cf58edc5</url>
<files><file uri="http://hgserver/$TESTTMP/cia/file/c0c7cf58edc5/bar" action="add">bar</file></files>
</commit>
</body>
<timestamp>0</timestamp>
</message>
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..