monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] [Patch] mtn automate lua


From: Thomas Keller
Subject: Re: [Monotone-devel] [Patch] mtn automate lua
Date: Sun, 07 Dec 2008 13:03:50 +0100
User-agent: Thunderbird 2.0.0.18 (Macintosh/20081105)

Stephen Leake schrieb:
> I guess you are saying it is the 'commit' command
> itself that checks the key, not the low level 'put_*'. That's
> surprising, but true:
> 
> address@hidden mtn automate put_file fs.cc
> 541589ed4bcfc1bc300597d937b2e9b32947099d
> 
> Why is the key not checked for every database write operation?

Well, I haven't implemented those ;)

>> Yes, one could speak of "local data" here, but it might not always be
>> easy to draw the line here. Are uncommitted changes in a local workspace
>> ("local data") already something which we want to protect from being
>> read by others? 
> 
> No, since they can read the committed versions. 
> 
> At the same time, does automate provide such a function? Should it?

There is automate inventory and automate content_diff; the latter
returns a full diff / add for new text fles.

> The help string for 'get_file' says:
> 
>   Prints the contents of a file (given an identifier).
> 
> I _assume_ that means a committed file, read from the database, but
> it's not clear.

Yes, get_file only works on committed contents, but not the other two I
mentioned above.

>> (Sure, it might not make sense in first place to manage a workspace
>> via stdio over a network, but what do I know about weird use cases
>> of our users?!)
> 
> yes, we cannot assume what use cases won't be used. But we _can_
> document the authentication behavior of 'automate stdio', and let the
> users assume responsibility for using it appropriately.

Ok, since automate stdio over network is currently not officially
supported by us anyways, I vote for deferring the whole issue.

>> There is another special failure: String arguments need to be given with
>> extra quotes, so
>>
>> $ ./mtn au lua echo "'foo'" or
>> $ ./mtn au lua echo '"foo"'
>>
>> works, while a simple
>>
>> $ ./mtn au lua echo "foo" or
>> $ ./mtn au lua echo 'foo'
>>
>> does not, since "foo" is evaluated as unknown global variable in these
>> cases and thus gets "silently" set to nil.
> 
> Ah. That's a pain, but at least is has a better work-around than
> "double all quotes"!

Well, I could do some "magic" and silently add quotes to non-quoted
strings, but I think if its properly documented it will make sense as well.

Thanks for your review! I'll quickly add some test cases and then it
should be ready to land on mainline.

Thomas.

-- 
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]