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

r20117:aa9385f9 default
r21195:9336bc7d stable
Show More
test-convert-svn-startrev.t
89 lines | 1.7 KiB | text/troff | Tads3Lexer
/ tests / test-convert-svn-startrev.t
$ "$TESTDIR/hghave" svn svn-bindings || exit 80
$ cat >> $HGRCPATH <<EOF
> [extensions]
> convert =
> EOF
$ convert()
> {
> startrev=$1
> repopath=A-r$startrev-hg
> hg convert --config convert.svn.startrev=$startrev \
> --config convert.svn.trunk=branches/branch1 \
> --config convert.svn.branches=" " \
> --config convert.svn.tags= \
> --datesort svn-repo $repopath
> hg -R $repopath log -G \
> --template '{rev} {desc|firstline} files: {files}\n'
> echo
> }
$ svnadmin create svn-repo
$ svnadmin load -q svn-repo < "$TESTDIR/svn/startrev.svndump"
Convert before branching point
$ convert 3
initializing destination A-r3-hg repository
scanning source...
sorting...
converting...
3 removeb
2 changeaa
1 branch, changeaaa
0 addc,changeaaaa
o 3 addc,changeaaaa files: a c
|
o 2 branch, changeaaa files: a
|
o 1 changeaa files: a
|
o 0 removeb files: a
Convert before branching point
$ convert 4
initializing destination A-r4-hg repository
scanning source...
sorting...
converting...
2 changeaa
1 branch, changeaaa
0 addc,changeaaaa
o 2 addc,changeaaaa files: a c
|
o 1 branch, changeaaa files: a
|
o 0 changeaa files: a
Convert at branching point
$ convert 5
initializing destination A-r5-hg repository
scanning source...
sorting...
converting...
1 branch, changeaaa
0 addc,changeaaaa
o 1 addc,changeaaaa files: a c
|
o 0 branch, changeaaa files: a
Convert last revision only
$ convert 6
initializing destination A-r6-hg repository
scanning source...
sorting...
converting...
0 addc,changeaaaa
o 0 addc,changeaaaa files: a c