Commits

Anonymous committed 1331a25

auto.track.new now uses internal update function to set current task

  • Participants
  • Parent commits e8ceef3

Comments (0)

Files changed (1)

                     'end': None, 'state': 0 }
         write(ui, repo, tasks)
 
+        # handle the auto tracking of newly created tasks on current node
         if not rev and ui.configbool('tasks', 'auto.track.new'):
-            currenttask = current(repo)
-            # with auto.track.new we are changing tasks so we may need to stash
-            # the current one
-            if ui.configbool('tasks', 'auto.stash') and trackingcurrent(repo):
-                if stash(ui, repo, currenttask):
-                    cleanup(repo)
-            setcurrent(ui, repo, task, True)
+            opts = {'rev':None, 'clean':False, 'date':None }
+            tasksupdate(commands.update, ui, repo, *[ task ], **opts)
         return
 
     # list tasks
     file.
     '''
 
+    print "HELLO!!"
+
     ontask = trackingcurrent(repo)
     currenttask = current(repo)
     tasks = parse(repo)