=== Guest65049 is now known as fredp === fredp is now known as Guest86845 [09:58] good morning [09:58] is there a way, in Bazaar, to get the ID of the "next" revision? (I can ignore the timestamp) [10:00] "next" in what sense? As in child of a particular rev? [10:00] usecase: I want to create a commit which has some code changes, + a benchmark file with the results produced by that change, and I want to name the benchmark file with the ID of the WIP revision, so that I can see that ID_A becnhmark file was obtained with changes coming from ID_A revision, although before comming ID_A does not exist yet [10:00] Not necessarily a unique answer to that. There's certainly no UI for it... [10:00] no ui needed :) [10:00] Oh. Not unless you specify it. [10:01] as in? [10:01] I mean, when you _create_ a rev, you can assign it an arbitrary ID. If you take sufficient precautions for the level of uniqueness you care about, you could just choose them yourself. [10:02] (pretty sure there's also no UI for that, but it's certainly possible at the API level) [10:02] e.g., the way a lot of the foreign VCS converters do. [10:03] fullermd: I'd rather trust the generator, I just need to get the same ID that bzr commit will get [10:03] From here, it seems like a lot of trouble and hackery for a pretty marginal case in this particular case, but... [10:03] Yeah, no way you can pull that off. bzr won't have any idea what it'll be until it gets there. [10:10] fullermd: mm ok...why though? how is the ID computed? [10:10] Well, part of it is random, so... [10:11] fullermd: so I guess it uses the current time of the commit as a seed [10:12] I don't think bzr explicitly seeds it. I think it's just the standard python PRNG, which may autoseed with the current time... [10:12] ok [10:14] 'd have to look at the code to be sure. But it would be an incredibly hacky and fragile construct trying to predict no matter what. So, I really don't think there's any way you can get there short of generating and choosing revids yourself. [10:16] I've got to find another way to choose a filename so that it is somehow linked to the commit that is going to be created [10:16] You could just 2-step it. [10:17] as in? [10:17] Make a random name, commit it, then rename it to the revid you now know. [10:17] ah well, sure [10:17] I'll think about it some more, thanks anyway ;) [10:17] You wind up with extra revs, but that's probably not a huge deal.