[07:19] thumper: still around ? [07:19] hi all [07:21] hihi [08:21] morning [08:25] morning mgz [08:30] vila: yeah [08:30] thumper: regarding create_signatures, what value do you want and under which conditions ? [08:31] hi vila [08:31] I want wikkid to not ask for signatures even if the main bazaar conf specifies it when committing changes [08:32] which conditions ? [08:33] all conditions [08:34] don' t set it in the conf then :) [08:34] you're asking bzr to do something, it does, why are you complaining ? [08:35] if the actual behavior does not suit your needs there are ways to use it differently, hence my question: under which conditions do you want a different configuration ? [08:40] thumper: ? [08:40] vila: I don't want someone to have to think about what sigs they may have set in their normal bazaar conf when using wikkid [08:41] wikkid should just never ask for signing [08:41] bzr wikkid -Ocreate_signatures=never [08:42] ? [08:42] what if using bin/wikkid-serve ? [08:43] in order to have a more complicated setup? [08:44] branch.get_config_stack().set('create_signatures', 'never') ? [08:44] for all branches used by wikkid ? [08:44] will that work? [08:44] why wouldn't it ? [08:45] I don't know... that is why I'm asking :) [08:45] is there a way to query the create_signatures value? [08:45] get('create_signatures')? [08:45] yup [08:46] but the value may come from somewhere else than branch.conf [08:46] so a vicious user can still set it in locations.conf. In this case I'd blame the user though [08:46] that's fine [08:46] cool [08:46] if I call set [08:46] that'll override locations? [08:46] no [08:47] really? [08:47] locations *is* the way to override [08:47] so if I call the set method, where does it set it? [08:47] in the local branch config? [08:47] yes [08:48] so if I call get, find it is true, then call set [08:48] if I call get again [08:48] a stack defines a list of config to query and a *single* config to modify [08:48] and it is true [08:48] it means set in locations? [08:48] no, you need a different stack to set in locations (and one tailored to set in whatever section you specify) [08:50] ah... [08:50] no, i think you are misunderstanding me [08:50] good, we're making progress ;) [08:50] if i call get, and it is true [08:50] then it could be set in one of three places right? [08:50] bazaar.conf, locations.conf, or the branch config [08:50] no, that's not designed this way [08:51] oh? [08:51] that seems to be how it is working [08:51] to my untrained eye [08:51] no, a stack defines only a *single* place for modifications [08:51] optional even [08:51] so you can have read-only stacks [08:51] sure, but I'm not specifing modifiction [08:52] I'm asking if I call "get(...)" and it returns true [08:52] the value can come from several different places [08:53] then if i call ".set(...)" it changes the branch config (as in the one in the local .bzr) [08:53] yes [08:53] doesn't matter where the 'true' value came from [08:53] and then if I call .get(...) again, it may be true if specified in locations.conf? [08:53] if I specified .set(..., false) [08:54] yes [08:54] right [08:54] that's all I need to know [08:54] that's the 'vicious' user I was mentioning [08:54] and you said that's fine [08:54] (which I agree with ;) [08:57] vila: wouldn't it be easier to just add a memory store as the first store in the stack, one which just sets create_signatures=never ? [08:57] jelmer: how will a user be able to control that ? [08:58] if he can't, it looks like a bad idea to me [08:58] vila: why should the user be able to control it? This is running inside of wikkid. [08:58] prompting for GPG passphrases in a non-interactive process is a bad idea. [08:59] a user may come up with a solution for that and will be annoyed by being blocked trying to make it work [09:00] vila: wikkid is essentially a web server - how can that ever properly prompt for a GPG signature if it does so on the server side? [09:01] fine, if it's a server it can be configured to not ask for gpg sigs, don't make a simple problem more complicated than it needs [09:02] vila: this discussion is how wikkid can properly configure it to not ask for gpg sigs [09:04] having to edit your configuration each time before running wikkid would be annoying [09:04] jelmer: the *user* decides how to configure, code should not remove this ability if there are ways to keep the user in control [09:05] vila: code can also decide what the author or revision properties of a new commit is going to be, there is no way for the user to override that [09:05] jelmer: do we have config options for that ? [09:05] vila: if an API user wants to create a commit without a signature (and it's got a good reason), I don't particularly see why we shouldn't accomodate that [09:05] -Ooption=value [09:06] the fact that the API (bzrlib/library_state) doesn't (yet) allow that is a known bug [09:06] vila: it doesn't make sense for *any* commits from wikkid to be signed, why should the user have to know or care about mandatory config options? [09:07] jelmer: famous last words [09:07] vila: the committer email comes from the config, and API users can override that [09:08] which is a bad idea given that there are ways to do that while still respecting what the user is asking for [09:09] jelmer: what's the point of pretending that an option can be configured if the code ignores what the user is saying ? [09:11] the code can be as smart as you want as long as it provides a *default* value. Once the user asks for a specific value though, the code must comply. [09:12] If the code cannot handle what the user is asking, an error is appropriate [09:12] vila: the point is that any value but "never" doesn't make sense in this case [09:12] If the code cannot handle what the user is asking, an error is appropriate [09:12] vila: an error may be appropriate if "create_signatures" is set to always [09:13] but it can also be set to when-required [09:13] does that address wikkid case ? [09:13] vila: that's still not particularly useful though [09:14] vila: I have create_signatures=always set; I do want bzr to always create signatures, but I never want wikkid to [09:14] 'always' doesn't match your use case then [09:15] but setting it in bazaar.conf while overriding it in specific branches does [09:15] vila: what does match my use case then? [09:16] setting it to 'always' in bazaar.conf while overriding it to 'never' in wikkid branches [09:16] no code needed [09:17] if you want to be fancy do create_signatures={wikkid.create_signatures} and set wikkid.create_signatures to an appropriate value when wikkid is running [09:17] vila: I run wikkid often in the same branches where I run bzr from the cli [09:17] see above [09:17] vila: anyway, perhaps we should abandon this discussion [09:18] well, that's the second time we have it :) [09:18] vila: that adds a bunch of extra setup for when I want to run wikkid? [09:19] setting an optin in bazaar.conf == 'a bunch of extra setup' ??? [09:19] vila: and for every other wikkid user too [09:20] vila: wikkid not working out of the box, but requiring editing of bazaar.conf is annoying [09:20] what's the out-of-the-box value for create_signatures ? [09:21] wikkid wants to not sign its commits [09:21] I'm not saying that makes sense (it doesn't to me), but there it is. [09:21] thumper: have you considered having wikkid sign its commits as itself ? [09:22] still needs to inject some behaviour, but it wouldn't lead to partially-signed trees [09:22] lifeless: it would have to take care of creating a password-less GPG key etc in that case [09:22] jelmer: something like that, and package install scripts are pretty good at that sort of thing [09:23] jelmer: also need a port to listen on, firewall holes etc [09:24] lifeless: I've usually run it as an ordinary user (myself), not as a system-wide daemon [09:38] lifeless: no... actually I have not considered that [09:38] lifeless: is it easy? [09:39] lifeless: wikkid may be running on a box where there isn't someone to sign :) [09:39] lifeless: but I guess there could be a GPG key that doesn't have a password [09:41] I've done that in the past (the passwordless gpg signing thing) [09:43] and then felt bad because it seemed like gpg 2 solved the same problem in a better way [09:43] but simplest thing etc. [10:13] * jelmer lunches === Ng_ is now known as Ng === yofel_ is now known as yofel === deryck is now known as deryck[afk] === deryck[afk] is now known as deryck [21:41] hi [21:41] is it possible to run basic bzr commands using php? [21:41] eagleon, only by executing the commands [21:42] you can use xmloutput to parse the output [21:42] 4 or 5 years ago I wrote php code to do exactly that [21:47] eagleon, so something like: $command = 'bzr log '.$path_to_bzr.' -vv --xml --show-ids -r -1 ' [21:47] with xmloutput installed [21:48] and then parse the xml output with something like simplexml