[Ml-yokadi] Using '_' as a shortcut to last task id
Aurélien Gâteau
aurelien.gateau at free.fr
Sun Oct 18 22:57:22 CEST 2009
(late answer, still struggling with new baby :))
Sébastien Renard a écrit :
> Le jeudi 8 octobre 2009 23:05:09, Aurélien Gâteau a écrit :
>> Sébastien Renard a écrit :
>>> Le mardi 29 septembre 2009 19:00:31, Sébastien Renard a écrit :
>>>> Hmm, I though I did it...
>>>>
>>>>> Maybe it's just github
>>>> Or maybe I was drunk.
>>>>
>>>> I just push it again and check it on web site. It is ok :
>>>> http://github.com/agateau/yokadi/tree/without_glob
>>> Should I merge "without_glob" branch into master ?
>> Sorry, but I don't like it. Having to add support for '_' explicitly
>> seems error prone and looks more complicated than having dbutils do the
>> work automatically.
>
> 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.
> 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?
>> (I say "seems" because I still need to figure
>> out why github does not want me to pull anymore).
>
> Strange. It works fine here.
Fixed by reuploading my ssh key, don't know why I needed to do this.
Aurélien
More information about the Ml-yokadi
mailing list