[07:53] Hello. New to Bazaar. Is there a way to only commit if the file was modified ? I'm trying to use Bazaar for some config file management, and I want to run a script periodically on a bzr repository, but I only want it to commit a file if it's contents are different from the current revision version of the file. [07:56] ant384: commit will fail by default if the file hasn't changed [07:57] morning! [07:57] hey mgz [08:00] Thanks [08:01] ant384, ps use etckeeper instead [08:15] mgz: I will be in this channel today (again) in case you have further questions regarding the bug we discussed the day before yesterday. [08:18] christiank: thanks [08:19] mgz: You're welcome! [08:29] bob2: seems like etckeeper is what I need. It has however a problem, it won't allow me to specify a message for commit, if I use "etckeeper commit -d /my/folder", it opens my text editor. If I want to do "etckeeper commit "some msg" -d /my/folder", it says /etc is not init-ed yet. [08:33] ant384: it has an equivalent of -m surely? [08:34] ant384: you probably just want the -d and path before the message [08:34] I'll just commit using bzr === mmrazik is now known as mmrazik|lunch [11:07] ant384: I only ran the etckeeper command to initialise, and after that I commit with bzr [11:08] ant384: also, I disabled the automatic commits when installing packages/dailies, but ymmv [11:16] * christiank is away: Lunch break === mmrazik|lunch is now known as mmrazik [12:12] * christiank is back (gone 00:55:26) === yofel_ is now known as yofel [13:21] Trying to invoke bzrlib.builtins.bzr_cat with a revision number. Without a revision number, I get the content of the current revision of the file. But I can't figure out how to specify the revision number. I tried revision=1 or "1", but in both cases I get errors. Not sure I can find the relevant docs. [13:37] ant384: calling builtin commands directly takes some knowledge of internals, they're not really an api [13:38] in this case, you either want to construct a revision spec, or there's a method on Command that does parsing from strings that will get the arguments right as-per called with argv [13:38] ant384: what are you trying to do exactly? If you're trying to get the contents of a file it might be easier to use the API rather than invoking the UI commands [13:39] and yes, you probably want to use the actual api more closely rather than the command level stuff [13:40] I'm trying to get the content of a file given a certain revision. [13:45] ant384: in that case you probably want to retrieve that particular tree from the repository and call tree.get_file_text() [13:50] I looked at the get_file_* documentation and none seem to accept revision numbers. Am I missing something ? Should I just run bzr as a system command from within Python ? [13:56] ant384: you should resolve the revision number to a revision id first; the branch has a method for this [14:42] * ant384 bangs his head against the desk [15:14] ant384: less banging more posting code if you get stuck :) === mark06 is now known as Guest6957 [15:55] hi mgz, I tracked the time problem down, it's python behaving in a crazy manner in presence of a TZ env var [16:00] mark06: thanks for reporting back [16:01] it might be worth seeing if there's a related python bug open or fixed already === deryck is now known as deryck[lunch] === deryck[lunch] is now known as deryck