Details
Details
- Reviewers
yuja - Group Reviewers
hg-reviewers - Commits
- rHGa918c996a881: py3: use encoding.strtolocal() to convert str to bytes
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| yuja |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| import os | import os | ||||
| import socket | import socket | ||||
| import tempfile | import tempfile | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| from mercurial import ( | from mercurial import ( | ||||
| cmdutil, | cmdutil, | ||||
| commands, | commands, | ||||
| encoding, | |||||
| error, | error, | ||||
| formatter, | formatter, | ||||
| hg, | hg, | ||||
| mail, | mail, | ||||
| node as nodemod, | node as nodemod, | ||||
| patch, | patch, | ||||
| pycompat, | pycompat, | ||||
| registrar, | registrar, | ||||
| # start | # start | ||||
| if date: | if date: | ||||
| start_time = util.parsedate(date) | start_time = util.parsedate(date) | ||||
| else: | else: | ||||
| start_time = util.makedate() | start_time = util.makedate() | ||||
| def genmsgid(id): | def genmsgid(id): | ||||
| return '<%s.%d@%s>' % (id[:20], int(start_time[0]), socket.getfqdn()) | return '<%s.%d@%s>' % (id[:20], int(start_time[0]), | ||||
| encoding.strtolocal(socket.getfqdn())) | |||||
| # deprecated config: patchbomb.from | # deprecated config: patchbomb.from | ||||
| sender = (opts.get('from') or ui.config('email', 'from') or | sender = (opts.get('from') or ui.config('email', 'from') or | ||||
| ui.config('patchbomb', 'from') or | ui.config('patchbomb', 'from') or | ||||
| prompt(ui, 'From', ui.username())) | prompt(ui, 'From', ui.username())) | ||||
| if bundle: | if bundle: | ||||
| stropts = pycompat.strkwargs(opts) | stropts = pycompat.strkwargs(opts) | ||||