Show More
@@ -3787,6 +3787,10 b' def debugtemplate(ui, repo, tmpl, **opts' | |||||
3787 | def debuguigetpass(ui, prompt=b''): |
|
3787 | def debuguigetpass(ui, prompt=b''): | |
3788 | """show prompt to type password""" |
|
3788 | """show prompt to type password""" | |
3789 | r = ui.getpass(prompt) |
|
3789 | r = ui.getpass(prompt) | |
|
3790 | if r is not None: | |||
|
3791 | r = encoding.strtolocal(r) | |||
|
3792 | else: | |||
|
3793 | r = b"<default response>" | |||
3790 | ui.writenoi18n(b'response: %s\n' % r) |
|
3794 | ui.writenoi18n(b'response: %s\n' % r) | |
3791 |
|
3795 | |||
3792 |
|
3796 |
@@ -157,6 +157,8 b' def _smtp(ui):' | |||||
157 | password = encoding.strfromlocal(password) |
|
157 | password = encoding.strfromlocal(password) | |
158 | else: |
|
158 | else: | |
159 | password = ui.getpass() |
|
159 | password = ui.getpass() | |
|
160 | if password is not None: | |||
|
161 | password = encoding.strfromlocal(password) | |||
160 | if username and password: |
|
162 | if username and password: | |
161 | ui.note(_(b'(authenticating to mail server as %s)\n') % username) |
|
163 | ui.note(_(b'(authenticating to mail server as %s)\n') % username) | |
162 | username = encoding.strfromlocal(username) |
|
164 | username = encoding.strfromlocal(username) |
@@ -1735,7 +1735,7 b' class ui(object):' | |||||
1735 | raise EOFError |
|
1735 | raise EOFError | |
1736 | return l.rstrip(b'\n') |
|
1736 | return l.rstrip(b'\n') | |
1737 | else: |
|
1737 | else: | |
1738 | return getpass.getpass('') |
|
1738 | return encoding.strtolocal(getpass.getpass('')) | |
1739 | except EOFError: |
|
1739 | except EOFError: | |
1740 | raise error.ResponseExpected() |
|
1740 | raise error.ResponseExpected() | |
1741 |
|
1741 |
General Comments 0
You need to be logged in to leave comments.
Login now