[Python-apps-commits] r10251 - in packages/gtg/trunk/debian (3 files)

dktrkranz at users.alioth.debian.org dktrkranz at users.alioth.debian.org
Thu Dec 12 11:24:38 UTC 2013


    Date: Thursday, December 12, 2013 @ 11:24:37
  Author: dktrkranz
Revision: 10251

Keep fuzzy dates relative to today

Added:
  packages/gtg/trunk/debian/patches/dates.patch
Modified:
  packages/gtg/trunk/debian/changelog
  packages/gtg/trunk/debian/patches/series

Modified: packages/gtg/trunk/debian/changelog
===================================================================
--- packages/gtg/trunk/debian/changelog	2013-12-12 11:19:03 UTC (rev 10250)
+++ packages/gtg/trunk/debian/changelog	2013-12-12 11:24:37 UTC (rev 10251)
@@ -1,6 +1,9 @@
 gtg (0.3.1-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  Ã* debian/patches/dates.patch:
+    -  Keep fuzzy dates relative to today, thanks to Frédéric Brière
+       for the bug report and the patch! (Closes: #722080).
   * debian/patches/keyworks.patch:
     - Implement Keyword key in the .desktop file.
   * debian/patches/manpages.patch:

Added: packages/gtg/trunk/debian/patches/dates.patch
===================================================================
--- packages/gtg/trunk/debian/patches/dates.patch	                        (rev 0)
+++ packages/gtg/trunk/debian/patches/dates.patch	2013-12-12 11:24:37 UTC (rev 10251)
@@ -0,0 +1,31 @@
+Description: Keep fuzzy dates relative to today
+Author: Frédéric Brière <fbriere at fbriere.net>
+
+Index: gtg-0.3.1/GTG/tools/dates.py
+===================================================================
+--- gtg-0.3.1.orig/GTG/tools/dates.py	2013-11-24 14:51:43.000000000 +0000
++++ gtg-0.3.1/GTG/tools/dates.py	2013-12-12 11:21:22.075273872 +0000
+@@ -61,10 +61,10 @@
+ }
+ # functions giving absolute dates for fuzzy dates + no date
+ FUNCS = {
+-    NOW: datetime.date.today(),
+-    SOON: datetime.date.today() + datetime.timedelta(15),
+-    SOMEDAY: datetime.date.max,
+-    NODATE: datetime.date.max - datetime.timedelta(1),
++    NOW: lambda: datetime.date.today(),
++    SOON: lambda: datetime.date.today() + datetime.timedelta(15),
++    SOMEDAY: lambda: datetime.date.max,
++    NODATE: lambda: datetime.date.max - datetime.timedelta(1),
+ }
+ 
+ # ISO 8601 date format
+@@ -130,7 +130,7 @@
+     def date(self):
+         """ Map date into real date, i.e. convert fuzzy dates """
+         if self.is_fuzzy():
+-            return FUNCS[self._fuzzy]
++            return FUNCS[self._fuzzy]()
+         else:
+             return self._real_date
+ 

Modified: packages/gtg/trunk/debian/patches/series
===================================================================
--- packages/gtg/trunk/debian/patches/series	2013-12-12 11:19:03 UTC (rev 10250)
+++ packages/gtg/trunk/debian/patches/series	2013-12-12 11:24:37 UTC (rev 10251)
@@ -1,2 +1,3 @@
 manpages.patch
 keywords.patch
+dates.patch




More information about the Python-apps-commits mailing list