[Ml-yokadi] Using '_' as a shortcut to last task id
Sébastien Renard
Sebastien.Renard at digitalfox.org
Mon Oct 19 09:03:34 CEST 2009
Le dimanche 18 octobre 2009 22:57:22, Aurélien Gâteau a écrit :
> > Automagically ;-). It is also error prone if we change dbutils (or don't
> > use it), each function have to update the global variable which is quite
> > bad.
>
> True. Even if I don't like your changes in without_glob, I agree that
> lastTaskId belongs to TaskCmd, as it really is shell related.
>
> I have been thinking about this, and I have another idea:
>
> - Move lastTaskId and getTaskFromId to TaskCmd
> - Make Task.do_t_add() update lastTaskId instead of dbutils.addTask()
>
> This breaks BugCmd, that's why I suggest to do this as well:
>
> - Move BugCmd.do_* to TaskCmd
> - Turn bugcmd.py into bugutils.py as it would only contains the toplevel
> functions.
Why not. It also highlight that we don't have a clear relationship between
tasks and bugs.
> > I have a better proposition :
> > - don't store last id but last task object. Do it at *cmd level.
> > - dbutils don't have to be aware of that. No change.
> > - api is light (if not "_" in line : self.task=...)
> > - we can remember distinct last task, last bug, last notes...
> >
> > A new branch without_glob2 has been pushed with a first draft of this
> > proposition (needs more test and unit test update).
>
> I don't see any changes in without_glob2. Are you sure you actually
> pushed the changes?
Oups. Sorry, I forgot to commit... This is done now. Can you have a look ?
a+
--
Sébastien
More information about the Ml-yokadi
mailing list