<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>src/yabt/commands/remove.py</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -30,6 +30,12 @@ class Index(object):
     def addTask(self, task):
         self.add(task.id, task.subject)
 
+    def remove(self, subject):
+        self.data.pop(subject)
+
+    def removeTask(self, task):
+        self.remove(task.subject)
+
     def get(self, subject):
         return self.data[subject]
 
@@ -45,6 +51,7 @@ class Task(object):
     def __init__(self, subject = &quot;&quot;, data = None):
         self.is_locked = False
         self.data = {}
+        self.file = TaskFile(self)
         if data is not None:
             self.__initialize(data)
         else:
@@ -136,6 +143,9 @@ class Task(object):
         f.write(str(self));
         f.close()
 
+    def remove(self):
+        self.file.remove();
+
     def generateId(self):
         sha = hashlib.sha1()
         sha.update(&quot;Created-On: &quot; + str(self.data[&quot;Created-On&quot;]))
@@ -143,6 +153,17 @@ class Task(object):
         sha.update(&quot;Subject: &quot; + self.subject)
         return sha.hexdigest()
 
+class TaskFile(object):
+    def __init__(self, task):
+        self.task = task
+
+    def remove(self):
+        task_name = self.generateTaskName()
+        os.remove(task_name)
+
+    def generateTaskName(self):
+        return os.path.join(os.getcwd(), &quot;.yabt&quot;, &quot;tickets&quot;, self.task.id)
+
 class TaskFactory(object):
     def find(self, criteria):
         strategies = [</diff>
      <filename>src/yabt/models.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fd6aa800d39cc1456f9c16c9d8a52bd00ff78454</id>
    </parent>
  </parents>
  <author>
    <name>Travis Swicegood</name>
    <email>travis@White-Rabbit.local</email>
  </author>
  <url>http://github.com/tswicegood/yabt/commit/7504804cc2b65a9ab6bed7e1997b6c081b5119f6</url>
  <id>7504804cc2b65a9ab6bed7e1997b6c081b5119f6</id>
  <committed-date>2009-02-21T14:30:15-08:00</committed-date>
  <authored-date>2009-02-21T14:30:15-08:00</authored-date>
  <message>Add a remove command

This introduces the TaskFile object.  I want to start moving all of
the file specific logic into that so a Task can off-load that.  That
also makes it easier for Tasks to exist in some other form of storage
should that be desired.</message>
  <tree>f367ea3f51451b2ff559d51b83b0c6af096d8826</tree>
  <committer>
    <name>Travis Swicegood</name>
    <email>travis@White-Rabbit.local</email>
  </committer>
</commit>
