← Back to team overview

duplicity-team team mailing list archive

Re: [Merge] lp:~mterry/duplicity/early-catch-498933 into lp:duplicity

 

I think you two have indeed hashed the design down to it's essentials, so
here are some thoughts on the issue.

The idea of get_info(filename_list) is a good idea, but it is not necessary
to specify what info to return.  It is necessary for this enhancement to
return the size, but most of the backends already do that, they just ignore
the data.  For example, ftp and ssh both return the results of 'ls -l'
although ftp may be problematic due to its various flavors.

Initially we just wanted it to return size info on just one file.  Maybe we
should make that default, but return the info in a list of dicts, i.e.
[{'name' : 'filename', 'size' : 5555}, ...].  'size' could be set to None if
the backend is not able to supply it.  Then we can just warn the user that
this backend is problematic and they should verify.

Ede, I am in favor of dicts for this.  foo[5] is mostly meaningless if you
are reading the code for the first time, while foo['size'] tells you
something about it.

...Ken

On Wed, Aug 24, 2011 at 9:12 AM, Michael Terry
<michael.terry@xxxxxxxxxxxxx>wrote:

> I feel like the importance of the details of the API design, while not a
> trivial matter, has still been dwarfed by the amount of virtual ink we've
> spilled.  :)
>
> I'm honestly fine with either way.  I'd be willing to do the work for
> either way.  Maybe Ken can chime in with further suggestions or how he'd
> like to see it, and I can start on a branch once I know how to code the API.
> --
>
> https://code.launchpad.net/~mterry/duplicity/early-catch-498933/+merge/72607<https://code.launchpad.net/%7Emterry/duplicity/early-catch-498933/+merge/72607>
> Your team duplicity-team is requested to review the proposed merge of
> lp:~mterry/duplicity/early-catch-498933 into lp:duplicity.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~duplicity-team
> Post to     : duplicity-team@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~duplicity-team
> More help   : https://help.launchpad.net/ListHelp
>

-- 
https://code.launchpad.net/~mterry/duplicity/early-catch-498933/+merge/72607
Your team duplicity-team is requested to review the proposed merge of lp:~mterry/duplicity/early-catch-498933 into lp:duplicity.


Follow ups

References