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

r21195:9336bc7d stable
r21195:9336bc7d stable
Show More
test-commandserver.py.out
259 lines | 5.4 KiB | text/plain | TextLexer
/ tests / test-commandserver.py.out
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing hellomessage:
Idan Kamara
tests: add basic commandserver test
r14770 o, 'capabilities: getencoding runcommand\nencoding: ***'
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand id
Idan Kamara
tests: add basic commandserver test
r14770 000000000000 tip
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing unknowncommand:
Idan Kamara
test-commandserver: flush stdout
r16117 abort: unknown command unknowncommand
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing checkruncommand:
runcommand
Idan Kamara
tests: add basic commandserver test
r14770 Mercurial Distributed SCM
basic commands:
Olav Reinert
help: format command and option list help using RST...
r16853 add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge working directory with another revision
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
serve start stand-alone webserver
status show changed files in the working directory
summary summarize working directory state
update update working directory (or switch revisions)
Idan Kamara
tests: add basic commandserver test
r14770
use "hg help" for the full list of commands or "hg -v" for details
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand id --quiet
Idan Kamara
tests: add basic commandserver test
r14770 000000000000
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand id
Idan Kamara
tests: add basic commandserver test
r14770 000000000000 tip
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand id --config ui.quiet=True
Idan Kamara
tests: add basic commandserver test
r14770 000000000000
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand id
Idan Kamara
tests: add basic commandserver test
r14770 000000000000 tip
Yuya Nishihara
cmdserver: mask return code of runcommand in the same way as dispatch.run...
r20631 runcommand id -runknown
abort: unknown revision 'unknown'!
[255]
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing inputeof:
Idan Kamara
tests: add basic commandserver test
r14770 server exit code = 1
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing serverinput:
runcommand import -
Idan Kamara
tests: add basic commandserver test
r14770 applying patch from stdin
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand log
Idan Kamara
tests: add basic commandserver test
r14770 changeset: 0:eff892de26ec
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: 1
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing cwd:
runcommand --cwd foo st bar
Idan Kamara
cmdserver: restore old working dir after dispatch when we have --cwd
r14864 ? bar
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand st foo/bar
Idan Kamara
cmdserver: restore old working dir after dispatch when we have --cwd
r14864 ? foo/bar
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing localhgrc:
runcommand showconfig
Yuya Nishihara
cmdserver: prepare test for starting server without repository
r20649 bundle.mainreporoot=$TESTTMP/repo
Idan Kamara
cmdserver: take repo.baseui as our ui...
r14882 defaults.backout=-d "0 0"
defaults.commit=-d "0 0"
David Soria Parra
shelve: add a shelve extension to save/restore working changes...
r19854 defaults.shelve=--date "0 0"
Idan Kamara
cmdserver: take repo.baseui as our ui...
r14882 defaults.tag=-d "0 0"
ui.slash=True
Mads Kiilerich
run-tests.py: don't let hg run interactively in debug mode...
r18449 ui.interactive=False
Idan Kamara
cmdserver: take repo.baseui as our ui...
r14882 ui.foo=bar
Yuya Nishihara
cmdserver: forcibly use L channel to read password input (issue3161)...
r21195 ui.nontty=true
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand init foo
Mads Kiilerich
tests: make test-commandserver.py independent of line ending and slash direction
r15542 runcommand -R foo showconfig ui defaults
Idan Kamara
cmdserver: take repo.baseui as our ui...
r14882 defaults.backout=-d "0 0"
defaults.commit=-d "0 0"
David Soria Parra
shelve: add a shelve extension to save/restore working changes...
r19854 defaults.shelve=--date "0 0"
Idan Kamara
cmdserver: take repo.baseui as our ui...
r14882 defaults.tag=-d "0 0"
ui.slash=True
Mads Kiilerich
run-tests.py: don't let hg run interactively in debug mode...
r18449 ui.interactive=False
Yuya Nishihara
cmdserver: forcibly use L channel to read password input (issue3161)...
r21195 ui.nontty=true
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing hookoutput:
runcommand --config hooks.pre-identify=python:test-commandserver.hook id
Idan Kamara
hooks: redirect stdout/err/in to the ui descriptors when calling python hooks...
r14889 hook talking
now try to read something: 'some input'
eff892de26ec tip
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing outsidechanges:
Idan Kamara
cmdserver: invalidate the dirstate when running commands (issue3271)...
r16114 runcommand status
M a
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand tip
Idan Kamara
cmdserver: repo.invalidate() on every runcommand...
r14939 changeset: 1:d3a0a68be6de
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: 2
Idan Kamara
cmdserver: invalidate the dirstate when running commands (issue3271)...
r16114 runcommand status
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541
testing bookmarks:
runcommand bookmarks
Idan Kamara
cmdserver: repo.invalidate() on every runcommand...
r14939 no bookmarks set
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand bookmarks
Idan Kamara
cmdserver: repo.invalidate() on every runcommand...
r14939 bm1 1:d3a0a68be6de
bm2 1:d3a0a68be6de
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 runcommand bookmarks
Idan Kamara
cmdserver: repo.invalidate() on every runcommand...
r14939 * bm1 1:d3a0a68be6de
bm2 1:d3a0a68be6de
Idan Kamara
scmutil: update cached copy when filecached attribute is assigned (issue3263)...
r16115 runcommand bookmarks bm3
runcommand commit -Amm
runcommand bookmarks
bm1 1:d3a0a68be6de
bm2 1:d3a0a68be6de
* bm3 2:aef17e88f5f0
Idan Kamara
cmdserver: repo.invalidate() on every runcommand...
r14939
Mads Kiilerich
tests: make test-commandserver.py output readable
r15541 testing tagscache:
runcommand id -t -r 0
runcommand id -t -r 0
Idan Kamara
cmdserver: repo.invalidate() on every runcommand...
r14939 foo
Idan Kamara
test-commandserver: test that phase data is being refreshed
r15989
testing setphase:
runcommand phase -r .
Idan Kamara
scmutil: update cached copy when filecached attribute is assigned (issue3263)...
r16115 3: draft
Idan Kamara
test-commandserver: test that phase data is being refreshed
r15989 runcommand phase -r .
Idan Kamara
scmutil: update cached copy when filecached attribute is assigned (issue3263)...
r16115 3: public
Idan Kamara
localrepo: clear _filecache on rollback (issue3261)...
r16116
testing rollback:
runcommand phase -r . -p
Idan Kamara
test-commandserver: flush stdout
r16117 no phases changed
Yuya Nishihara
cmdserver: include non-zero return code of runcommand in test output
r20630 [1]
Idan Kamara
localrepo: clear _filecache on rollback (issue3261)...
r16116 runcommand commit -Am.
runcommand rollback
repository tip rolled back to revision 3 (undo commit)
working directory now based on revision 3
runcommand phase -r .
3: public
Idan Kamara
dirstate: filecacheify _branch...
r16201
testing branch:
runcommand branch
default
marked working directory as branch foo
(branches are permanent and global, did you want a bookmark?)
runcommand branch
foo
marked working directory as branch default
(branches are permanent and global, did you want a bookmark?)
Idan Kamara
dirstate: filecacheify _ignore (issue3278)...
r16202
testing hgignore:
runcommand commit -Am.
adding .hgignore
runcommand status -i -u
I ignored-file
Idan Kamara
localrepo: always write the filtered phasecache when nodes are destroyed (issue3827)...
r18757
testing phasecacheafterstrip:
runcommand update -C 0
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
runcommand commit -Am. a
created new head
runcommand log -Gq
@ 5:731265503d86
|
| o 4:7966c8e3734d
| |
| o 3:b9b85890c400
| |
| o 2:aef17e88f5f0
| |
| o 1:d3a0a68be6de
|/
o 0:eff892de26ec
runcommand phase -p .
runcommand phase .
5: public
runcommand branches
default 1:731265503d86
Julien Cristau
dispatch: take --hidden from individual commands into account...
r20330
testing obsolete:
runcommand up null
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
runcommand phase -df tip
runcommand log --hidden
changeset: 1:731265503d86
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: .
changeset: 0:eff892de26ec
bookmark: bm1
bookmark: bm2
bookmark: bm3
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: 1
runcommand log
changeset: 0:eff892de26ec
bookmark: bm1
bookmark: bm2
bookmark: bm3
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: 1
Yuya Nishihara
cmdserver: reload mq on each runcommand request to avoid corruption...
r20628
testing mqoutsidechanges:
runcommand qapplied
runcommand qapplied
0.diff
Yuya Nishihara
cmdserver: recreate mq object on runcommand in case queue path was changed...
r20629 runcommand qpop --all
popping 0.diff
patch queue now empty
runcommand qqueue --active
foo
Yuya Nishihara
cmdserver: allow to start server without repository...
r20650
Yuya Nishihara
cmdserver: forcibly use L channel to read password input (issue3161)...
r21195 testing getpass:
runcommand debuggetpass --config ui.interactive=True
password: 1234
Yuya Nishihara
cmdserver: allow to start server without repository...
r20650 testing hellomessage:
o, 'capabilities: getencoding runcommand\nencoding: ***'
runcommand id
abort: there is no Mercurial repository here (.hg not found)
[255]
testing startwithoutrepo:
runcommand init repo2
runcommand id -R repo2
000000000000 tip