/srv/irclogs.ubuntu.com/2012/05/23/#bzr.txt

vilathumper: still around ?07:19
vilahi all07:19
mgrandihihi07:21
mgzmorning08:21
vilamorning mgz08:25
thumpervila: yeah08:30
vilathumper: regarding create_signatures, what value do you want and under which conditions ?08:30
thumperhi vila08:31
thumperI want wikkid to not ask for signatures even if the main bazaar conf specifies it when committing changes08:31
vilawhich conditions ?08:32
thumperall conditions08:33
viladon' t set it in the conf then :)08:34
vilayou're asking bzr to do something, it does, why are you complaining ?08:34
vilaif 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:35
vilathumper: ?08:40
thumpervila: I don't want someone to have to think about what sigs they may have set in their normal bazaar conf when using wikkid08:40
thumperwikkid should just never ask for signing08:41
vilabzr wikkid -Ocreate_signatures=never08:41
thumper?08:42
thumperwhat if using bin/wikkid-serve ?08:42
thumperin order to have a more complicated setup?08:43
vilabranch.get_config_stack().set('create_signatures', 'never') ?08:44
vilafor all branches used by wikkid ?08:44
thumperwill that work?08:44
vilawhy wouldn't it ?08:44
thumperI don't know... that is why I'm asking :)08:45
thumperis there a way to query the create_signatures value?08:45
thumperget('create_signatures')?08:45
vilayup08:45
vilabut the value may come from somewhere else than branch.conf08:46
vilaso a vicious user can still set it in locations.conf. In this case I'd blame the user though08:46
thumperthat's fine08:46
vilacool08:46
thumperif I call set08:46
thumperthat'll override locations?08:46
vilano08:46
thumperreally?08:47
vilalocations *is* the way to override08:47
thumperso if I call the set method, where does it set it?08:47
thumperin the local branch config?08:47
vilayes08:47
thumperso if I call get, find it is true, then call set08:48
thumperif I call get again08:48
vilaa stack defines a list of config to query and a *single* config to modify08:48
thumperand it is true08:48
thumperit means set in locations?08:48
vilano, you need a different stack to set in locations (and one tailored to set in whatever section you specify)08:48
thumperah...08:50
thumperno, i  think you are misunderstanding me08:50
vilagood, we're making progress ;)08:50
thumperif i call get, and it is true08:50
thumperthen it could be set in one of three places right?08:50
thumperbazaar.conf, locations.conf, or the branch config08:50
vilano, that's not designed this way08:50
thumperoh?08:51
thumperthat seems to be how it is working08:51
thumperto my untrained eye08:51
vilano, a stack defines only a *single* place for modifications08:51
vilaoptional even08:51
vilaso you can have read-only stacks08:51
thumpersure, but I'm not specifing modifiction08:51
thumperI'm asking if I call "get(...)" and it returns true08:52
vilathe value can come from several different places08:52
thumperthen if i call ".set(...)" it changes the branch config (as in the one in the local .bzr)08:53
vilayes08:53
viladoesn't matter where the 'true' value came from08:53
thumperand then if I call .get(...) again, it may be true if specified in locations.conf?08:53
thumperif I specified .set(..., false)08:53
vilayes08:54
thumperright08:54
thumperthat's all I need to know08:54
vilathat's the 'vicious' user I was mentioning08:54
vilaand you said that's fine08:54
vila(which I agree with ;)08:54
jelmervila: 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
vilajelmer: how will a user be able to control that ?08:57
vilaif he can't, it looks like a bad idea to me08:58
jelmervila: why should the user be able to control it? This is running inside of wikkid.08:58
jelmerprompting for GPG passphrases in a non-interactive process is a bad idea.08:58
vilaa user may come up with a solution for that and will be annoyed by being blocked trying to make it work08:59
jelmervila: 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:00
vilafine, 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 needs09:01
jelmervila: this discussion is how wikkid can properly configure it to not ask for gpg sigs09:02
jelmerhaving to edit your configuration each time before running wikkid would be annoying09:04
vilajelmer: the *user* decides how to configure, code should not remove this ability if there are ways to keep the user in control09:04
jelmervila: 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 that09:05
vilajelmer: do we have config options for that ?09:05
jelmervila: 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 that09:05
vila-Ooption=value09:05
vilathe fact that the API (bzrlib/library_state) doesn't (yet) allow that is a known bug09:06
jelmervila: 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:06
vilajelmer: famous last words09:07
jelmervila: the committer email comes from the config, and API users can override that09:07
vilawhich is a bad idea given that there are ways to do that while still respecting what the user is asking for09:08
vilajelmer: what's the point of pretending that an option can be configured if the code ignores what the user is saying ?09:09
vilathe 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:11
vilaIf the code cannot handle what the user is asking, an error is appropriate09:12
jelmervila: the point is that any value but "never" doesn't make sense in this case09:12
vilaIf the code cannot handle what the user is asking, an error is appropriate09:12
jelmervila: an error may be appropriate if "create_signatures" is set to always09:12
jelmerbut it can also be set to when-required09:13
viladoes that address wikkid case ?09:13
jelmervila: that's still not particularly useful though09:13
jelmervila: I have create_signatures=always set; I do want bzr to always create signatures, but I never want wikkid to09:14
vila'always' doesn't match your use case then09:14
vilabut setting it in bazaar.conf while overriding it in specific branches does09:15
jelmervila: what does match my use case then?09:15
vilasetting it to 'always' in bazaar.conf while overriding it to 'never' in wikkid branches09:16
vilano code needed09:16
vilaif you want to be fancy do create_signatures={wikkid.create_signatures} and set wikkid.create_signatures to an appropriate value when wikkid is running09:17
jelmervila: I run wikkid often in the same branches where I run bzr from the cli09:17
vilasee above09:17
jelmervila: anyway, perhaps we should abandon this discussion09:17
vilawell, that's the second time we have it :)09:18
jelmervila: that adds a bunch of extra setup for when I want to run wikkid?09:18
vilasetting an optin in bazaar.conf == 'a bunch of extra setup' ???09:19
jelmervila: and for every other wikkid user too09:19
jelmervila: wikkid not working out of the box, but requiring editing of bazaar.conf is annoying09:20
vilawhat's the out-of-the-box value for create_signatures ?09:20
lifelesswikkid wants to not sign its commits09:21
lifelessI'm not saying that makes sense (it doesn't to me), but there it is.09:21
lifelessthumper: have you considered having wikkid sign its commits as itself ?09:21
lifelessstill needs to inject some behaviour, but it wouldn't lead to partially-signed trees09:22
jelmerlifeless: it would have to take care of creating a password-less GPG key etc in that case09:22
lifelessjelmer: something like that, and package install scripts are pretty good at that sort of thing09:22
lifelessjelmer: also need a port to listen on, firewall holes etc09:23
jelmerlifeless: I've usually run it as an ordinary user (myself), not as a system-wide daemon09:24
thumperlifeless: no... actually I have not considered that09:38
thumperlifeless: is it easy?09:38
thumperlifeless: wikkid may be running on a box where there isn't someone to sign :)09:39
thumperlifeless: but I guess there could be a GPG key that doesn't have a password09:39
mgzI've done that in the past (the passwordless gpg signing thing)09:41
mgzand then felt bad because it seemed like gpg 2 solved the same problem in a better way09:43
mgzbut simplest thing etc.09:43
* jelmer lunches10:13
=== 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
eagleonhi21:41
eagleonis it possible to run basic bzr commands using php?21:41
beunoeagleon, only by executing the commands21:41
beunoyou can use xmloutput to parse the output21:42
beuno4 or 5 years ago I wrote php code to do exactly that21:42
beunoeagleon, so something like: $command = 'bzr log '.$path_to_bzr.' -vv --xml --show-ids -r -1 '21:47
beunowith xmloutput installed21:47
beunoand then parse the xml output with something like simplexml21:48

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!