Changeset 182


Ignore:
Timestamp:
07/17/07 14:36:48 (14 years ago)
Author:
bas
Message:

email2trac.py.in, ChangeLog?:

  • applied patch in ticket #2

email2trac.spec, debian/changelog:

  • New version 0.10.0
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r179 r182  
    4040          Requested by: Ramon Bastiaans
    4141          Fixed by    : Bas van der Vlies <basv@sara.nl>
     42
     43        * A date patch so it works with trac version 0.11 for ticket updates.
     44          Also applied for other trac versions.
     45          Thanks to: tbaschak at ktc dot mb dot ca
    4246
    43472007-04-27
  • trunk/debian/changelog

    r156 r182  
     1email2trac (0.10.0-1) stable; urgency=low
     2
     3  * New release, see ChangeLog
     4
     5 -- root <root@rc.sara.nl>  Tue, 17 Jul 2007 14:15:14 +0200
     6
    17email2trac (0.9.5-1) stable; urgency=low
    28
  • trunk/email2trac.py.in

    r177 r182  
    9292import traceback
    9393
     94from datetime import tzinfo, timedelta, datetime
     95
    9496
    9597# Some global variables
     
    9799trac_default_version = 0.10
    98100m = None
     101
     102
     103
     104# A UTC class needed for trac version 0.11, added by
     105# tbaschak at ktc dot mb dot ca
     106#
     107class UTC(tzinfo):
     108        """UTC"""
     109        ZERO = timedelta(0)
     110        HOUR = timedelta(hours=1)
     111       
     112        def utcoffset(self, dt):
     113                return self.ZERO
     114               
     115        def tzname(self, dt):
     116                return "UTC"
     117               
     118        def dst(self, dt):
     119                return self.ZERO
    99120
    100121
     
    466487                        subject  = self.email_to_unicode(m['Subject'])
    467488
     489                # [hic] #1529: Re: LRZ
     490                # [hic] #1529?owner=bas,priority=medium: Re: LRZ
     491                #
    468492                TICKET_RE = re.compile(r"""
    469493                                        (?P<ticketnr>[#][0-9]+:)
     
    578602                        %(head, body_text)
    579603
    580                 when = int(time.time())
     604                #when = int(time.time())
     605                utc = UTC()
     606                when = datetime.now(utc)
    581607
    582608                ticket_id = tkt.insert()
     
    10191045                        # see http://projects.edgewall.com/trac/changeset/2799
    10201046                        from trac.ticket.notification import TicketNotifyEmail
     1047                elif version == 0.11:
     1048                        from trac import attachment
     1049                        from trac.env import Environment
     1050                        from trac.ticket import Ticket
     1051                        from trac.web.href import Href
     1052                        from trac import util
     1053                        #
     1054                        # return  util.text.to_unicode(str)
     1055                        #
     1056                        # see http://projects.edgewall.com/trac/changeset/2799
     1057                        from trac.ticket.notification import TicketNotifyEmail
     1058
    10211059       
    10221060                env = Environment(settings['project'], create=0)
  • trunk/email2trac.spec

    r174 r182  
    11Summary: Utilities for converting emails to trac tickets
    22Name: email2trac
    3 Version: 0.9.5
     3Version: 0.10.0
    44Release: 1
    55License: GPL
Note: See TracChangeset for help on using the changeset viewer.