equal
deleted
inserted
replaced
29 logcmdutil, |
29 logcmdutil, |
30 mail, |
30 mail, |
31 pycompat, |
31 pycompat, |
32 registrar, |
32 registrar, |
33 ) |
33 ) |
34 from mercurial.utils import dateutil |
34 from mercurial.utils import ( |
|
35 dateutil, |
|
36 stringutil, |
|
37 ) |
35 from .. import notify |
38 from .. import notify |
36 |
39 |
37 configtable = {} |
40 configtable = {} |
38 configitem = registrar.configitem(configtable) |
41 configitem = registrar.configitem(configtable) |
39 |
42 |
95 data = ui.popbuffer() |
98 data = ui.popbuffer() |
96 |
99 |
97 try: |
100 try: |
98 msg = mail.parsebytes(data) |
101 msg = mail.parsebytes(data) |
99 except emailerrors.MessageParseError as inst: |
102 except emailerrors.MessageParseError as inst: |
100 raise error.Abort(inst) |
103 raise error.Abort(stringutil.forcebytestr(inst)) |
101 |
104 |
102 msg['In-reply-to'] = notify.messageid(ctx, domain, messageidseed) |
105 msg['In-reply-to'] = notify.messageid(ctx, domain, messageidseed) |
103 msg['Message-Id'] = notify.messageid( |
106 msg['Message-Id'] = notify.messageid( |
104 ctx, domain, messageidseed + b'-published' |
107 ctx, domain, messageidseed + b'-published' |
105 ) |
108 ) |