diff -r 80b53082a353 -r e7937438e3f7 mercurial/commandserver.py --- a/mercurial/commandserver.py Tue Dec 22 08:00:03 2015 +0000 +++ b/mercurial/commandserver.py Mon Dec 14 23:13:42 2015 +0900 @@ -215,8 +215,11 @@ self.repo.invalidateall() for ui in uis: - # any kind of interaction must use server channels - ui.setconfig('ui', 'nontty', 'true', 'commandserver') + # any kind of interaction must use server channels, but chg may + # replace channels by fully functional tty files. so nontty is + # enforced only if cin is a channel. + if not util.safehasattr(self.cin, 'fileno'): + ui.setconfig('ui', 'nontty', 'true', 'commandserver') req = dispatch.request(args[:], copiedui, self.repo, self.cin, self.cout, self.cerr)