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