several questions about your commits from branches/attachments.

Vlad Skvortsov vss at 73rus.com
Thu Aug 9 14:55:28 PDT 2007


Ivan Glushkov wrote:
> Hi.
>
> 1. From Issue.py:
>             for a in self.attachment_delta[0]:
>                 assert a.name not in attachments
>                 attachments.add_object(a)
>
>             for a in self.attachment_delta[1]:
>                 assert a.name in attachments
>                 attachments.remove_object(a)
>
>
> May be we should better use not an array, but a hash 
> attachmetn_delta["add"],attachment_delta["rm"]?

Yeah, that was somewhat striking me too... Fixed in r1857.

>
> 2. act.py:
>             elif r == mi_new:
>                 ti = DITrack.UI.TextInput("File to attach (blank to 
> abort)")
>
>                 while 1:
>                     fname = ti.run()
>
> ...
>                         issue.add_attachment(fname)
>
>
> It is possible to define a key for attachment in _Attachments:add(), 
> but it's not allowed to determine it here.

Why do you think it would be usable? I can imagine only one use case 
where a user wants to attach a file under different name than it is on 
the disk. I think in this case there is a simple workaround of renaming 
the file into desired name beforehand.

Adding a possibility to attach a file under a different "short name" 
seems like unnecessary complexity to me (at least at this point).

>
>
> 3. May be we should use some agreement about attachments naming? For 
> example to link to the second attachment of the 5'th issue: "i#5.f2"? 
> Or something similar?

Yeah, we might... But there is a problem of "unusual" file names here 
(spaces, commas, etc). So it's not that straightforward. I suggest 
getting users' feedback after the 0.6 release to decide how we want to 
handle that.

>
> 4. i might ask this too early and you've done it already, but:
>    It would be very handy to see such output after 'acting' on issue:
>     "File %s was attached as i#%d.f%d"  (using the agreement in 
> previous suggestion)

I'll implement something similar (committing attaches doesn't work yet).

-- 
Vlad Skvortsov, vss at 73rus.com, http://vss.73rus.com



More information about the Dev mailing list