hgext/patchbomb.py
changeset 4564 087b3ae4f08a
parent 4563 1cf908c00479
child 4597 ec431334e4fc
equal deleted inserted replaced
4563:1cf908c00479 4564:087b3ae4f08a
   250         revs = outgoing(dest, opts.get('rev'))
   250         revs = outgoing(dest, opts.get('rev'))
   251     if opts.get('bundle'):
   251     if opts.get('bundle'):
   252         opts['revs'] = revs
   252         opts['revs'] = revs
   253 
   253 
   254     # start
   254     # start
   255     start_time = util.makedate()
   255     if opts.get('date'):
       
   256         start_time = util.parsedate(opts['date'])
       
   257     else:
       
   258         start_time = util.makedate()
   256 
   259 
   257     def genmsgid(id):
   260     def genmsgid(id):
   258         return '<%s.%s@%s>' % (id[:20], int(start_time[0]), socket.getfqdn())
   261         return '<%s.%s@%s>' % (id[:20], int(start_time[0]), socket.getfqdn())
   259 
   262 
   260     def getexportmsgs():
   263     def getexportmsgs():
   405     (patchbomb,
   408     (patchbomb,
   406      [('a', 'attach', None, 'send patches as inline attachments'),
   409      [('a', 'attach', None, 'send patches as inline attachments'),
   407       ('', 'bcc', [], 'email addresses of blind copy recipients'),
   410       ('', 'bcc', [], 'email addresses of blind copy recipients'),
   408       ('c', 'cc', [], 'email addresses of copy recipients'),
   411       ('c', 'cc', [], 'email addresses of copy recipients'),
   409       ('d', 'diffstat', None, 'add diffstat output to messages'),
   412       ('d', 'diffstat', None, 'add diffstat output to messages'),
       
   413       ('', 'date', '', _('use the given date as the sending date')),
   410       ('g', 'git', None, _('use git extended diff format')),
   414       ('g', 'git', None, _('use git extended diff format')),
   411       ('f', 'from', '', 'email address of sender'),
   415       ('f', 'from', '', 'email address of sender'),
   412       ('', 'plain', None, 'omit hg patch header'),
   416       ('', 'plain', None, 'omit hg patch header'),
   413       ('n', 'test', None, 'print messages that would be sent'),
   417       ('n', 'test', None, 'print messages that would be sent'),
   414       ('m', 'mbox', '', 'write messages to mbox file instead of sending them'),
   418       ('m', 'mbox', '', 'write messages to mbox file instead of sending them'),