/srv/irclogs.ubuntu.com/2009/02/22/#bzr.txt

KhaZHi!  Quick question here.  I've historically ran one large depot in svn, with multiple projects inside of it.  I'm thinking of splitting them each into their own repositories - is there a 'smart' way of doing this, so as to keep revision history?00:58
lifelessbzr svn-import will may just do the right thing00:58
lifelessit will depend on how your svn repo is structured00:59
KhaZSorry, I should have specified - I've currently bulk imported them into a bzr repo00:59
lifelessusing svn-import ?00:59
KhaZYes.00:59
lifelessand it didn't identify the branches for you ?00:59
KhaZSo I've got one giant repo with allm y changes from svn (Yay svn-import!), and I'd rather not lose them as I break them into smaller repos.00:59
KhaZWell, I didn't do my svn repo as branches.  It was more just a series of directores inside of 'trunk'.01:00
lifelessok01:00
lifelesswell you can tell bzr-svn where the branches should be01:00
lifelessthen svn-import again, and it will split appropriately01:00
KhaZlifeless: Is there any thing I can do the bzr depot?  I've grown rather smitten with bzr and have been doing changes against it, instead of svn.01:01
lifelessKhaZ: well, you can use bzr split, but it will still keep the older history as being one-big-depot01:01
lifelessso if you're splitting for size reasons it won't help you, but if you'resplitting just for clarity it will do what you need01:02
KhaZlifeless: So, say I have directories A, B, C, and I want to split them into their own depot.  Are you saying it'll keep all the histories, but only branch the contents?01:02
KhaZ(i.e., I'll have branch 'A' with only contents from A, but histories from B and C as well?)01:02
lifelessyes01:02
lifelessbecause one commit back would be the big tree01:02
lifelesswhat split does is essentially bzr branch your depot, delete everything except the named directory (e.g. A) and then commit01:03
KhaZAnd there's no way to obliterate history in bzr?01:04
lifelessnot directly no01:04
lifelessyou could fast-export your depot then fast-import-filter it back in01:05
KhaZHrmm.  I guess I'll have to think about this.01:05
lifelessthe fast-export approach soundslike its the closest fit to what you're asking for01:06
lifeless(its a bzr plugin)01:06
KhaZlifeless: Ah, neat.  I'll have to check that out.01:07
KhaZThanks for spitballin' with me lifeless .01:07
lifelessnp01:08
lifelessjml: around?01:30
=== thumper_laptop is now known as thumper
jmllifeless: am now.04:25
lifelesswhat would you like to see in subunit before an announcement to tip04:28
lifelessor alternatively04:28
lifelesswhat things are 'it really should have' for subunit that it doesn't04:29
lifelessjml: ^04:37
jmllifeless: a web page with some friendly guff + documentation.04:38
jmllifeless: not sure what else04:39
jmllifeless: some kind of effort to integrate with nose, maybe04:40
lifelesswhat would that do?04:40
jmllifeless: get nose to print subunit output04:40
lifelessah, tell it to use a subunit TestResult?04:41
lifelesshttps://edge.launchpad.net/subunit isn't sufficient guff?04:41
lifelessbug 33277004:46
ubottuLaunchpad bug 332770 in subunit "provide a nose extension to output subunit" [Undecided,New] https://launchpad.net/bugs/33277004:46
lifelessjml: with pycon coming up it seems worth trying to get a 'release' done04:52
jmllifeless: I think a more friendly "how to" style document would be a good idea04:54
lifelessjml: do  you have any interest in writing it ?04:55
jmllifeless: yes.04:56
lifelesscool04:57
jmllifeless: but before pycon? ... we'll see.04:57
=== davidstrauss_ is now known as davidstrauss
lifelessjml: what would you expect the commands 'subunit-filter' and 'subunit-ls' to do06:58
lifelessabentley: the --no- option stuff - was that exposing something optparse does anyway, or custom for bzr?07:31
=== scode_ is now known as scode
scodeI would like to use bzr with a workflow similar to what is often used with e.g. darcs/git, where I have my 'upstream' repository that I have branched on multiple places. I then want to commit and periodically push from all these places, but I do not want to do a bunch of merges all the time.09:26
scodeI have vague recollection of there being a way to do a "flat" merge that does not track the merge history to accomplish this, but I cannot find it now.09:26
scodeI.e., the problem isn't that I have to use "bzr merge", but rather that I do not want to litter the history with a lot of bogus merges that do not actually represent merges frmo the perspective of the workflow.09:27
luksby flat merges you mean joining multiple commits into one?09:29
luksor re-applying the patches from the merge branch?09:29
lifelessscode: well, if you actually have flat history there won't be merges at all09:29
lifelessscode: so if its just you on many machines09:36
scodeI want to merge the changes into my wc without bzr actually treating it like a merge.09:36
scodeExample workflow:09:37
scode* branch to A and B09:37
lifelessscode: you can just sit down, bzr pull, commit push etc09:37
scode* add file in A, commit, push09:37
scode* add file in B, commit push -> bork because I need to merge, merge, push -> upstream now has a merge in the history09:37
lifelessscode: so if you have committed in A and B concurrently, you need to merge09:37
scodelifeless: Yes, but it's very easy to forget to push , and sometimes I may not have access to do so.09:37
lifelessscode: you ahve two choices, don't actually commit in B until you pull, or rebase09:38
scodeUsing the rebase plugin?09:38
lifelessyah09:38
lifelessits how many git users avoid merges09:39
lifelessI don't think merges are an issue myself - if you have actually done concurrent changes they just reflect reality after all :)09:39
scodeWell, in git I don't end up with having to merge by default at all, assuming no conflicting changes.09:39
scodeAnd definitely not with darcs.09:39
scodelifeless: Well, in this case it's not very useful and just confusing to be keeping all that merge info in the history.09:40
scodelifeless: Especially since the branches are not really branches workflow wise, and have no identification.09:40
scodeJust n random branches.09:40
scodeAnyways.09:40
scodelifeless: Thanks!09:40
lifelessscode: so you can also09:41
lifelessmerge --pull09:41
lifeless(or just pull)09:41
lifelessgit doesn't have magic here - a fast forward pull is either an exact match, or a rebase, or an implicit merge09:42
lifeless(where it merges for you)09:42
scodelifeless: Yeah, but since git doesn't track merges it doesn't really matter :)09:42
luksit does09:43
scodeIn the case of darcs there's definitely no difference at least, I could be wrong about git.09:43
lifelessscode: you mean in log? (git does track merges, exactly the same as bzr - a list of N parents to a commit object)09:43
scodeIn the sense of not affecting revision numbers, etc since your branch is just a sequence of hashes.09:43
scodeThough I guess it doesn't look too nice if you ever want to check out the branching history.09:44
scodeI suppose what I really want in this case is simply darcs semantics.09:45
lifelessscode: yes, darcs semantics are quite nice in some respects09:59
lifelessjml: if you're around, I have a subunit-ls too; pondering same-branch/different-branch10:02
=== beaumonta is now known as abeaumont
nabobhi13:02
abentleylifeless: The hidden, automatic nature of the no- options is custom.13:33
=== mark1 is now known as markh
pisiStupid question but something that always pisses me off with web based VC viewers: how could I checkout http://bzr.tensixtyone.com/pytikitag/files ? which is the URL for bzr ?17:47
james_wit's not clear17:49
james_wunfortunately there is no way to know, as it is possible to set up access to the branches in many ways17:50
pisiis there some standard or something that I could try?17:50
james_wwell, using the same URL often works (without the "/files" bit)17:51
james_wbut in this case it doesn't seem to17:51
=== abadger_afk is now known as abadger1999
Peng_Loggerhead trunk can now serve bzr, and gives the URL for it.18:55
=== eaumontab is now known as abeaumont
alfHello, in my new job I have to use svn for revision control. Being very fond of bzr I have been thinking of using bzr-svn to interact with the subversion repository.21:00
alfI am whether this can cause any problems for other using the svn repository (through normal svn)?21:01
alf+ wondering21:01
alfeg the file/revision properties that bzr-svn uses21:02
beunoalf, I don't think so, I know many people who use bzr-svn to interact with svn at work21:03
andresjhello, whats the difference between `mkdir one; cd one; bzr init .; bzr pull /some/path;` and `mkdir two; cd two; bzr branch /some/path .`21:06
andresj?21:06
alfbeuno: Well, I am going to give it a try and hope for the best!21:07
alfIs there a way for bzr-svn to record merges in logs?21:08
alfI mean, to also include the logs of the merged revisions in the svn log entry21:09
beunoalf, I don't really know, i haven't used it myself21:10
james_wandresj: doesn't the second create two branches?21:10
james_wandresj: ah, misread, the second puts the branch in ./two/path/, the first in ./one/ I believe21:11
james_whey beuno21:11
lifelessandresj: the second will probably error, as branch creates a branch21:11
lifelessandresj: other than that they are essentially identical21:12
lifelessandresj: the latter can be spelt 'bzr branch /some/path two'21:12
james_whey lifeless21:12
lifelesshi james_w21:12
lifelessalf: apparently some svn servers have a commit hook that includes diffs to file properties; bzr-svn can create noise there, but thats all21:12
andresjlifeless: wait what about an error with the second one?  `bzr branch /some/path .` should make the current directory the branch21:13
lifelessandresj: 'mkdir .' -> fail21:13
lifelessandresj: 'bzr branch foo bar' does a mkdir bar21:13
andresjhum, really? oh but i see what you mean---so they basically do the same thing. thank you, lifeless :)21:14
beunohuya james_w!21:14
lifelessandresj: the major difference is that the format won't be preserved21:14
andresjhold on a second, please, lifeless21:15
andresj(stupid old router ;P)21:15
andresjok im back :)21:16
andresjwhat format wont be preserved, lifeless?21:16
lifelessandresj: e.g. if /some/path is something non-default, like a loom, 'bzr branch' will preserve that, but doing a manual init won't.21:16
andresjhum... i see, i see---so ill be sure to branch instead of init, pull from now :P21:17
lifelessandresj: http://paste.ubuntu.com/121561/21:17
andresjlifeless: http://paste.ubuntu.com/121562/ ;P21:21
lifelessandresj: heh21:22
igcmorning21:59
mwhudsonhi igc22:00
igchi mwhudson22:01
lifelessjml: when you get a chance, after work or so; subunit - new branch to review22:23
jmllifeless: ahh right.22:23
jmllifeless: so, in answer to your earlier question....22:23
jmllifeless: I'd expect subunit-filter to be a thing like grep that used higher-level subunit concepts, rather than regexen22:23
jmllifeless: and I don't have a clear idea of what subunit-ls would do -- discover tests in ... what?22:24
ronnysubunit?22:24
lifelessjml: it outputs just their names22:25
lifelessjml: like lsdiff outputs the files altered in a patch22:25
jmlronny: https://launchpad.net/subunit22:25
ronnylooks usefull22:26
ronnydoes the python child support things like nose?22:26
lifelessbug 33277022:27
ubottuLaunchpad bug 332770 in subunit "provide a nose extension to output subunit" [Undecided,New] https://launchpad.net/bugs/33277022:27
lifelessronny: the python child is a unittest.TestResult22:28
ronnyoh, sad22:28
lifelessronny: so anything that honours that protocol will work with subunit22:28
ronnyi really dislike unittest tho22:28
lifelessnose is basically unittest, last I looked22:28
lifelessthough they seem to be going slowly mad22:28
ronnywell, it hides away the pain22:28
ronnylifeless: i could use a tool that can set up different envs with different versions of a tool22:29
ronnyso i can run anyvc's unittests against all supported versions of hg, bzr, dulwich, subvertpy22:30
lifelessjml: does testtools have load_tests support yet? or scenarios?22:31
jmllifeless: spiv has a patch up for scenarios22:31
lifelessronny: bzr has interface tests for this purpose; we write tests to an interface and parameterise the tests22:31
jmllifeless: I'm a bit suspicious of load_tests, partly due to ignorance.22:31
ronnylifeless: thats what i do in anyvc, too22:32
spivjml: API xenophobia?22:32
lifelessjml: its my third attempt at that problem, I think its the right one22:32
ronnycurrently i run against one version of each tool22:32
ronnyi'd prefer to be able to run against multiple versions22:32
lifelessjml: I'd be happy to discuss22:33
lifelessronny: right, so test parameterisation setting python paths; and subunit to get a fresh interpreter for each, ftw22:33
jmllifeless: it's possible. everything else in testtools (IIRC) is things that have been used in more than one project.22:33
jml[modulo grammar]22:33
jmllifeless: but likewise, am happy to talk about it later.22:34
lifelessjml: load_tests is simply a hook for TestLoader, between implicit discovery and actual use.22:34
ronnylifeless: i'd like to have a way to pass the parameters as something like pkg_resource requirements or something, and setting up a custom virtualenv for each22:34
lifelessronny: yes, that would be trivial glue on top22:35
lifelessthe parameters would be in your scenario definitions22:35
lifelessyour external test case proxies would turn those into virtualenv however you want to do that22:36
ronnylifeless: sounds nice22:39
ronnylifeless: hmm, the protocol seems confusing, does it have any base?22:39
ronnylifeless: got a bnf gramar or something like that?22:42
lifelessspiv: ping22:42
lifelessronny: not really, it was designed to be primarily human readable22:43
ronnyoh :(22:43
lifelessronny: I can whip up a BNF at some point; its nearly a BNF anyhow in the README22:43
spivlifeless: pong22:43
lifelessspiv: what is the mechanism by which pack-names is refreshed when the autopack rpc is used?22:44
lifelessspiv: streaming push needs the same thing22:44
spivlifeless: bzrlib/smart/packrepository.py22:44
spivlifeless: the verb just relies on _pack_collection.autopack() to DTRT22:45
lifelessspiv: I mean on the client22:45
spivOh, right22:45
lifelessself._real_repository - how does it see the new pack22:45
lifelessis there a 'refresh thyself' method I can call from RemoteSink ?22:45
spivself._real_repository._pack_collection.reload_pack_names()22:45
=== Daviey_ is now known as Daviey
lifelessI die a little every time22:46
spivThat line in remote.py is preceded by a comment saying that perhaps the automatic retry logic will make that unnecessary...22:46
lifelessspiv: it doesn't22:47
lifelessspiv: for streaming push22:47
lifelessspiv: because no file IO errors occur, we just have a new pack that the real repo does not know about22:49
spivAh, yeah.  Unless an autopack did occur, of course.22:49
spivBut not in the general case.22:50
lifeless:!./bzr --no-plugins selftest branch_implementations.*Remote22:51
lifelesspasses22:51
ronnylifeless: another thing i dont get is that obsession with xunit22:51
lifelessronny: reusable code is good22:51
ronnylifeless: but xunit isnt exactly nice in python22:52
lifelessunittest is somewhat fugly22:53
lifelessbut that was barely even a transliteration of xUnit22:53
lifelesspy.test makes my want to cry22:53
ronny1:1 transliterations never end well :(22:54
ronnylifeless: dont ever support it22:54
lifelessdoctest has caused enough grief that we should sue the author22:54
lifeless'crimes against humanity'22:54
ronnythese insane fuckers dont deserve support ;P22:54
mwhudsoni think when it comes down to the ugly details of testing "real" code things like "xunit offends my sensibilities" go flying out of the window22:54
ronnypy.lib and py.test are damn messed up22:55
lifelessspiv: so coordination call?22:55
spivlifeless: sounds good22:55
lifelessskype or pots22:56
spiveither's fine with me22:56
ronnyi wouldnt mind unittests so much if unittest keept the tests more readable and used pythonic patterns22:56
ronnyeh unittest i mean22:56
ronnythe problem is, it works, so we are stuck with it22:57
santagadaI really enjoy py.test... but doctests drives me crazy23:02
ronnysantagada: py.test is only fun till it breaks things23:03
ronnythen it wil lbe impossible to debug it cause of the insane things in it23:03
santagadaronny: I only used it in pypy, so it never broke anything...23:03
santagadaronny: I got I little insane trying to learn how to write a plugin for it23:04
santagadabut after you get the hang of it it is quite straightforward23:04
santagadaI think the biggest problem is lack of real docs, about internals and all23:04
ronnyi ditched it for nosetest23:05
ronnyless magic more docs23:05
ronnylifeless: btw, how are the nose devs starting to go insane?23:05
santagadaronny: nosetest is cool, but less magic also mean less cool features23:05
ronnysantagada: what do you think is missing?23:05
ronnythe more magic is involved the harder debugging real breakages gets23:06
santagadaspecially when you assert something py.test has much more information about the variables involved23:06
ronnynosetest -d enables assert introspection23:06
santagadathis is probably new23:06
ronnybeen there since ages23:06
ronnyafair its also allmost ported to jython, ironpython and python323:07
santagadaeither I didn't notice it or it doesn't work like py.test23:07
ronnyit doesnt do weird magic onless you ask it to23:07
santagadaronny: have you tried the one from twisted?23:08
santagadatrial I think23:08
ronnyyeah, behaved weird, no idea if it was my fault23:09
ronnyim kinda allergic to the crimes twisted generates23:09
spivabentley: bundlebuggy23:09
spivabentley: bundlebuggy is 502ing23:09
abentleyspiv: restarted23:11
ronnysantagada: im thinking about writing an own one later23:11
ronnylifeless: why is the stream like test: thelabel\nresult: thelabel [...]23:12
ronnywouldnt it be enough to just pass the results23:13
mwhudsonronny: you seem very opinionated :)23:13
ronnymwhudson: yeah23:13
santagadaronny: please don't do it... create a plugin for py.test or nose23:13
ronnymost likely for nose23:13
ronnyi'd like it to report to a dbus location23:13
spivabentley: thanks!23:14
santagadasee, something easy to do with py.test, probably the same with nose23:14
santagadagtg23:14
ronnylifeless: it would be nice if there was a way to track extra stuff like tracebacks or stdout/stderr for the tests23:14
lifelessronny: the nose devs seem to be slowly adding py.test magic23:16
lifelessronny: I should track it more closely, because thats as accurate and precise as I can be at the moment23:16
lifelessronny: re: trial, trial is largely sane now thanks to jml23:16
lifelessronny: re: the duplication, its to catch interrupted streams23:17
lifelessronny: and hung tests23:17
lifelessstart, finish catches hung tests23:17
lifelessstart THING, finish THING -> catches interrupted tests (start FOO, start BAR, finish BAR, and similar)23:18
lifelessspiv: down to 63 calls for non-stacked23:19
jmllifeless: trial has been improved now by many people since I was actively working on it.23:19
lifelessjml: I credit you with unfucking it when it was at its worst23:19
lifelessjml: the rest is just folk understanding that it can be good23:19
lifelessjelmer: ping23:20
ronnylifeless: do you see any reasonable way to hook into getting extra data like timings, stdout/stderr produced by each test and others?23:21
lifelessronny: sure, as long as its in the test comment area of the protocol its captured and put in the RemoteBacktrace23:23
lifelesstimings -> use the time: tag23:23
ronnyah, k23:23
ronnyi'll have to get more into it23:23
lifelessI need to add builtin generation of time: tags in the python client23:23
lifelessfor now its just defined in the protocol, for folk doing benchmark work23:23
lifelessronny: one of my main uses today is:23:24
lifelessbzr selftest --subunit > tests.log23:24
ronnylifeless: btw, why do you leave many ways to spell some things like test vs testing?23:24
lifelesssubunit-filter < tests.log | subunit-ls > failing.list23:24
lifelessbzr selftest --load-list failing.list23:25
lifelessand loop23:25
lifeless(with hacking in the middle)23:25
ronnywoot23:25
lifelessonly loads tests that failed the previous time around23:25
lifelessronny: test|testing|etc etc - generous in what you accept, strict in what you emit :)23:26
lifelessronny: some folk are funny about what they want to see23:26
ronnyhmm, i wonder if there is a reasonable way to deal with generator-tests23:28
lifelessdo you mean factories that create many tests?23:28
ronnyyeah23:28
ronnytheir test id's are a bit messy in nose23:29
lifelessfor subunit it doesn't care - it doesn't require unique ids23:29
lifelessbut its the same really as bzr's test scenarios23:29
lifelesshave you seen our ids ?23:29
ronnyno23:29
ronnyi guess you guys just rerun the full generator?23:29
lifelesstest_merge_sorted_range_stop_include_forward(BzrBranchFormat5)23:30
ronny(or do you have a way to figure what part to rerun)23:30
lifelessfor loading tests do you mean ?23:30
ronnyyeah23:30
lifelesswe generate all the scenarios and filter23:30
spivIt'd be possible to do better than that with the load_tests hook, if we cared.23:32
spiv(I think)23:32
ronnyie skip scenario generators that completely passed?23:33
lifelessronny: pass the filter into the generator23:33
spivRight.23:33
lifelessspiv: be difficult to balance filter generalism with actual skipping though23:34
spivAt the moment generating a scenario is sufficiently cheap that we don't care.23:34
spivlifeless: yeah23:34
spivlifeless: see also "if we cared" ;)23:34
ronnywouldnt i have to manage filtering myself then?23:34
spivWell, I'd imagine we'd provide filtering by default in our TestScenarioApplier or whatever its called.23:35
lifelessronny: you could ignore the parameter if you didn't care23:35
lifelessmyself, I think the current solution is simple and sane23:35
* spiv agrees with lifeless23:35
ronnylifeless: are there any conventions for the result metadata?23:39
ronny(ie the comment block)23:39
ronnyjust want to know it it would make sense to even try parsing23:39
lifelessronny: the python client writes the stacktrace in a way that can be reconstituted23:40
lifelessronny: but other languages may not - e.g. the C client could just 'SEGFAULT' :P23:40
lifelessspiv: heh:     self.assertEqual(1, autopack_calls + streaming_calls)23:40
lifelessAssertionError: not equal:23:40
lifelessa = 123:40
lifelessb = 423:40
lifelessspiv: yay for tests eh what23:40
ronnyhmm23:41
spivlifeless: :)23:41
ronnyi really wish things like self.assertEqual(a,b) would go away for assert a==b23:41
lifelessronny: I like my tests to work with pyo files :)23:42
ronnylifeless: i kinda hate that optimazion - also - who the heck tests that way (bzr selftests are an exception thi)23:45
lifelessspiv: I want remember_remote_is_after()23:46
lifelessronny: it is an odd optimisation :P23:47
spivronny: not all assertions are about equality, though...23:48
spivlifeless: (not that I doubt you do want that) what for?23:49
spivlifeless: the existing infrastructure for coping with different client/server versions is definitely a bit too simple.  At least it isn't a bit too complex, though ;)23:50
ronnyspiv: i dont see any reason why most of those self.assertFoo couldnt go away for just assert23:50
lifelessspiv: after I know that streaming push works23:51
lifelessspiv: or perhaps medium.verb_exists(verb)23:51
spivronny: grep for "def assert" in bzrlib/tests sometime23:51
spivronny: the base assertion methods on TestCase aren't so interesting23:52
lifelessspiv: 60 and 85 now23:52
lifelessspiv: bzr search -s assert23:52
lifelessspiv: much more useful :)23:53
spivronny: it's the domain-specific ones that any sizeable project starts growing that really interesting.23:53
jml(and actually, assert methods are kind of lame)23:55
ronnyspiv: the ones i have seen so far use only self.assertEqual23:55
ronnyhmm23:55
lifelessjml: I'm thinking of dropping subunit.RemotedTestCase from the id of RemotedTestCase's23:56
lifelessjml: thoughts23:56
jmllifeless: I manually drop it in Tribunal23:56
lifelessjml: ok, I'll nuke it tonight23:59
jmllifeless: cool.23:59

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