[hamster-applet] don't eliminate overlapping entries - it's better to have overlaps than to miss data
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] don't eliminate overlapping entries - it's better to have overlaps than to miss data
- Date: Sun, 18 Jul 2010 13:14:47 +0000 (UTC)
commit d783ffe5c751eefb034f41c2f40952114297bc41
Author: Toms Bauģis <toms baugis gmail com>
Date: Sun Jul 18 14:14:21 2010 +0100
don't eliminate overlapping entries - it's better to have overlaps than to miss data
src/hamster/db.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/hamster/db.py b/src/hamster/db.py
index f985160..6b7822b 100644
--- a/src/hamster/db.py
+++ b/src/hamster/db.py
@@ -398,6 +398,8 @@ class Storage(storage.Storage):
end_time, start_time, end_time, start_time))
for fact in conflicts:
+ # won't eliminate as it is better to have overlapping entries than loosing data
+
# split - truncate until beginning of new entry and create new activity for end
if fact["start_time"] < start_time < fact["end_time"] and \
fact["start_time"] < end_time < fact["end_time"]:
@@ -419,13 +421,6 @@ class Storage(storage.Storage):
WHERE fact_id = ?"""
self.execute(tag_update, (new_fact_id, fact["id"])) #clone tags
- #eliminate
- elif fact["end_time"] and \
- start_time < fact["start_time"] < end_time and \
- start_time < fact["end_time"] < end_time:
- logging.info("eliminating %s" % fact["name"])
- self.__remove_fact(fact["id"])
-
# overlap start
elif start_time < fact["start_time"] < end_time:
logging.info("Overlapping start of %s" % fact["name"])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]