/srv/irclogs.ubuntu.com/2008/12/08/#bzr.txt

=== visik7|away is now known as visik7
jmllifeless: how hard would it be to add a rename-thread feature to loom?00:43
lifelessjml: trivial - load the dict, alter it, save it, change the current nick (which points into the dict) IF its the same as teh thread breaing renamed00:44
lifelessjml: got a few minutes?01:05
jmllifeless: I will in a bit.01:05
jmllifeless: ok. what's up?01:10
* jelmer once again wishes Python did tail recursion properly01:41
mwhudsoni need a plugin that has an "oh crap, i've been editing in trunk again" command03:25
igchello all03:37
mwhudsonhello igc!03:37
igchi mwhudson03:37
mwhudsonigc: i gave my bzr talk at osdc last week03:39
igchow did it go?03:39
mwhudsonalright, i think03:41
mwhudsoni went for a fairly gentle introduction to dvcs03:41
mwhudsonmost people had used cvs, almost all svn, a few bzr, about the same git, not so many hg03:42
mwhudsona good way to start a talk: "how many of you have used branches with subversion?"03:42
mwhudson(almost all the hands go up)03:42
mwhudson"how many of you enjoyed it?"03:43
mwhudson(most hands go down)03:43
igcmwhudson: :-)03:44
spivmwhudson: that bit was very good :)03:57
mwhudsoni do think it's worth making the point that most "next gen" vcs tools are just _better_ than svn03:58
mwhudsoneven if you don't do distributed things03:58
pygimwhudson, tho people sometimes just don't care :)04:00
mwhudsonpygi: well yes, but that's fine04:00
mwhudsonpygi: but some people also say "this is a one man/in house project, the d in dvcs doesn't get me anything"04:00
pygimwhudson, right...04:01
spivjelmer: congrats on the 0.5.0rc1 !04:03
jelmerspiv, thanks :-) It took me long enough...04:03
pygijelmer, you really never sleep o.O04:04
pygiisn't it like 5AM for you? o.O04:04
jelmeryeah, I just wanted to get this release out..04:05
jelmerI do usually sleep at this time of day :-)04:05
jelmerpygi, you're still in CA ?04:05
pygijelmer, when was  I in CA? :P04:06
pygijelmer, I'm in Croatia :P04:06
jelmerpygi, I figured it would be 5 AM for you as well..04:06
pygijelmer, yes, it is 5AM for me too :p04:06
jelmerso I assumed you were at UDS04:06
jelmerpygi, heh, ok04:06
pygicongrats on the release ;)04:07
jelmerthanks :-)04:07
* jelmer sees he has another 5 hours left for sleep, might as well use them04:08
jelmerg'night!04:08
pyginight night :)04:08
mwhudsoni don't bother thinking about what time it is for someone before pinging them on irc any more04:08
spivjelmer: I thought you were sleeping :P04:53
=== spm_ is now known as spm
shelaghI'm trying to use bzr for a local file that I want to get weekly snapshots for.06:42
shelaghI think I've stuffed the setup stage as I keep getting asked about branches, when I try to add the file to bzr.06:42
shelaghWhat I want is essentially simple (I thought). But I'm obviously missing something.06:44
shelaghI've used rcs before, but eventually this file will be mirrored on a file server and so bzr seems like a better choice.06:45
AfCshelagh: you're describing about the simplest use case going07:14
AfC$ bzr init .07:14
AfC$ bzr add filename.txt07:14
AfC$ bzr commit -m "It is 6 o'clock and all is well"07:15
AfCfollowed by a commit next week.07:15
AfC(on the assumption that you want to make . the Bazaar branch)07:15
vilahi all07:18
=== toytoy_ is now known as toytoy
shelaghAfC: thanks for that.08:09
shelaghAfC: so I need to go into the directory that I put into bzr and add the file?08:09
shelaghI need to practice this at home before I try it at work again.08:09
jaavaagururegardless of how /win 1208:40
jaavaaguruoops08:41
Peng_Hmmm, I think turning off plugins may have fixed my Loggerhead memory issues.09:49
Peng_I haven't given it much time to confirm it, but it only grew a few KB in 30 minutes. Before, it would've been...10 or 20 MB, maybe?09:52
spivPeng_: wild guess... you had bzr-svn installed?10:09
Peng_spiv: Heh, it's always bzr-svn, isn't it? :P10:12
Peng_Since my last update it's been growing a bit, so that may not have fixed it anyway.10:13
Peng_OK, I can say now that disabling plugins definitely seems to have fixed it.11:20
spivPeng_: Interesting!11:23
Peng_Is it possible to exclude a specific plugin from being loaded from code, or should I just uninstall it?11:39
spivPeng_: echo 'raise ImportError' > ~/.bazaar/plugins/plugin_name.py11:51
spivPeng_: Oh, from code :)11:52
spivPeng_: You can probably do something like "import sys; sys.modules['bzrlib.plugins.plugin_name'] = None"11:52
spivWhich IIRC is how sys.modules caches that an import cannot be found.11:52
Peng_So when bzr imports it, it would load the dummy instead of the real module? Huh, neat.11:53
spiv(if you go with the dummy module that raises ImportError, don't forget to remove the .pyc as well as the .py when you want to remove the dummy)11:54
Peng_The sys.modules hack seems to work. Neato!11:55
* spiv -> sleep11:59
Peng_Good night.12:00
ArjenWhat would be the best way to count the number of commits in a repository?13:33
=== vednis is now known as mars
etankArjen: just a guess but wouldn't bzr log show you the revno? is that the same thing?13:43
ArjenThat's only the mainline13:50
ArjenI want the total number of commits13:51
etankim trying to get the all-in-one install of bzr for windows to work13:52
etankit works fine on one machine but not another13:52
etankit is the 1.9 version that i am working with13:53
=== asac_ is now known as asac
luksasac: bzr info -v14:29
lukser14:29
luksArjen: ^14:29
etankargh14:44
etankfinally got my bzr on windows to work14:47
etankhad to reinstall then do "set BZR_SSH=paramiko"14:48
* etank is happy now :)14:48
etankpingdotfm: finally got my bzr on windows to work. had to reinstall then do "set BZR_SSH=paramiko" to get it to work.14:50
etankoops :)14:50
Takwait, how did you get your bzr on windows to work? :-P14:50
etankTak: i used the all-in-one installer14:58
etankhow can i make bzr always use paramiko instead of plink?15:03
etankit keeps going back to plink and i get "ssh implementation is Putty's plink."15:03
lukshm, I though it uses paramiko by default15:04
luksyou can set the BZR_SSH variable globally15:04
luksControl Panel -> System -> Environment Variables or something like that15:04
etankthanks luks that did the trick15:06
oldmanis there an easy way to 'forget' remembered submit branch locations?15:16
jelmeroldman, see .bzr/branch/branch.conf15:16
jelmeryou can also get it to remember a new location by using --remember15:17
oldmanexcellent, thanks15:17
=== ja1 is now known as jam
jamGood morning to all15:21
jamAnyone have experience debugging DNS issues on Windows 2003?15:21
jamIt seems that there are DNS servers, and doing "nslookup" works, but doing "socket.gethostbyname()" does not.15:21
etankjam: maybe flush your dns cache first15:25
=== ja1 is now known as jam
jamI don't know if anyone responded, I seemed to have a network glitch15:26
etankjam: maybe flush your dns cache first15:26
jametank: well, I did do "repair" which is supposed to do that, and I've even rebooted that machine15:26
etankipconfig /flushdns15:27
jam(It is a virtual host, which we use for the win32 builds)15:27
jamI'll try that, I guess15:27
jamI found one google result that looked interesting, but it is a "members only" page: http://www.experts-exchange.com/Networking/Unix_Networking/Q_22643954.html15:28
etankjam: i have an account there if you want me to look at it for you15:29
jametank: still failing15:30
jametank: that would be nice, though I don't know if it will actually know the answer15:30
jamprobably worth trying15:30
jambtw, do you remember the location of "hosts" and "lmhosts" ?15:30
etankc:\windows\system32\drivers\etc15:31
jamI never quite understood that. Maybe because the network stack was BSD based?15:31
etankjam: here is the "answer" from the ee page http://dpaste.com/97018/15:32
etankmay not be of any use though15:32
jamugh15:33
jamyeah, not the problem I'm having15:33
jamit seems that lmhosts.sam is empty, hosts is almost empty15:34
etankthats normal15:35
jamthe one interesting entry in 'hosts' does indeed resolve for "gethostbyname()"15:36
etankshould have a "127.0.0.1       localhost" by default and that is it15:36
jamIt has 2 lines:15:36
jam127.0.0.1            LOCALHOST15:36
jam10.0.10.14 vzsveaddress15:36
jamI assume the latter has to do with how the virtual host was set up15:36
etankor you wanted it to resolve even if the dns server was not found15:37
jamsure, but regardless those are the only ones that "work" on this machine for "gethostbyname()" while "nslookup" seems to do just fine.15:38
etankwhat module does bzr use to read the config?15:40
etankConfigParser?15:40
jamConfigObj15:40
jambzrlib/util/configobj/configobj.py15:40
jamsimilar, but also supports writing15:41
jamand has support for some stuff that we don't really use15:41
jamlike lists15:41
etankcool15:41
jaminteresting, it seems to be "the default gateway is not on the same subnet + subnet mask as the ip address"15:50
jamso my guess it is getting confused by that15:51
jamok, really weird15:51
etankthat sounds about right15:51
jamthe IP address is a public address15:51
jambut the default gateway is a 192.168 addres15:51
etankare you natting or bridging the connection?15:51
jamI have no idea15:51
jamthis is a virtual host provided by someone in Australia15:51
etankoh15:51
jamas I can connect via terminal services and openssh, my first guess would be bridge15:52
jambut I don't know yet15:52
jamI think it is at the point that we need to escalate to their support, but I think only poolie can do tha15:52
jamthat15:52
jamyeah, I can submit a support request, but it will go to his email address, which makes it hard for me to respond :)15:55
jamlifeless: ping15:55
lifelessjam: pong16:31
jamjust asking if you could give poolie a poke if you see him16:31
jamI need him to open a support case with the host of kerguelen16:31
lifelessk16:31
jamthanks16:31
lifelessI think he's still to arrive at the venue16:31
jamlifeless: it isn't critically urgent, so you don't have to go search for him, but if you do run into him, just let him know16:38
jamthanks16:38
gioelehi16:58
gioeleis there a way to clean the obsolete_packs dir (pack-0.92 format)16:59
gioeleI used bzr pack to save some space but I ended up doubling the space used: X in packs and X+something in obsolete_packs17:00
jamgioele: rm .bzr/repository/obsolete_packs/*17:00
jamIt will clean itself out eventually17:00
jamat the next time it goes to pack/autopack17:01
gioelejam: is that safe to do?17:01
jamdon't delete the *directory* but you can delete the files17:01
jamI would probably run "sync" first17:01
gioelewhy are these "obsolete" packs kept around?17:02
jambecause we don't know if the OS will order things correctly17:02
jamand actually write things to disk before the system crashes17:02
jamas it is your precious ancestry we are dealing with17:02
jamwe default to safe17:02
gioelejam: is it my $HOME backup, almost as precious as my ancestry ;)17:03
jamso if you know you have another backup, you know the system won't crash right away, etc17:03
jamsync && rm .bzr/repository/obsolete_packs/*17:03
jamshould  be fine17:03
jamjust make sure to not delete the directory itself17:04
gioeleok (I have a backup of the backup anyway)17:04
gioeledone17:04
gioeleeverything seems fine17:15
gioelethanks jam17:15
jamhappy to help17:15
lifelessjam: I suggest mailing him17:18
jamI did17:18
lifeless:)17:18
lifelessjam: I intend to read your updated commit-uses-add-by-delta patch, haven't had time to grab a diff vs my branc to see the changes17:19
jamI'm pretty sure I summarized the important changes in the email.17:20
jambut that doesn't give you a code-level view17:20
lifelessright17:20
lifelesscocneptually I'm cool with it17:20
seb_kuzminskyi'm converting a smallish svn repo with a couple of branches to bzr17:51
seb_kuzminskyi'm planning to use "bzr svn-import"17:51
seb_kuzminskyi'm planning to put it in a shared bzr repo17:51
seb_kuzminskyi'm using bzr 1.1017:51
seb_kuzminskywhat repo format should I use (for "bzr init-repo")?  --1.9?17:52
seb_kuzminsky--1.9-rich-root?17:52
lifelessseb_kuzminsky: 1.9-rich-root17:53
lifelessthough I think svn-import makes its own repo17:53
lifelesspoolie: jam was pinging for you17:53
seb_kuzminskythanks lifeless17:54
jelmerlifeless, yep, it does17:54
seb_kuzminskyso i dont need to init-repo before svn-import?17:55
seb_kuzminskyi did a 'bzr svn-import' and it gave me a rich-root-pack repo, not 1.9-rich-root18:08
seb_kuzminskyi have bzr-svn 0.4.1618:08
seb_kuzminskyand bzr 1.10rc118:08
jelmerseb_kuzminsky, that's correct18:08
jelmerseb_kuzminsky, rich-root-pack should work fine as well18:08
jelmerseb_kuzminsky, and is supported by more older versions of bzr18:08
seb_kuzminskygoing back to 1.0 it says18:09
jelmerseb_kuzminsky, if you would like to use 1.9-rich-root, you can use "bzr upgrade --1.9-rich-root" in that directory18:09
seb_kuzminskyok thanks jelmer18:09
seb_kuzminskyjelmer: it worked :-)18:20
seb_kuzminskyjelmer: but is there a way (some --schema perhaps) to turn svn's trunk/branches/tags structure into native bzr representations?18:21
seb_kuzminskyi'll try --scheme=trunk18:23
seb_kuzminskythe default is "auto", but even with -v, svn-import didnt tell me what it was doing18:24
seb_kuzminskyand it seems to have used "none" scheme, instead of "trunk" which is what i think i want18:24
Peng_Thanks to that hack to load most plugins but not bzr-svn, it seems bzr-svn is the source of my Loggerhead memory leak..18:32
beunoPeng_, that's interesting18:32
jelmerPeng_: which bzr-svn ?18:32
jelmerbeuno, does loggerhead use find_branches() at all?18:32
beunoI guess we should add a --no-plugins to server branches?18:33
beunojelmer, no, it shouldn't18:33
jelmerbeuno, what about find_bzrdirs() ?18:33
Peng_jelmer: Latest 0.4 branch.18:34
beunojelmer, nope18:34
jelmerbeuno, how does it find the branches then in serve-branches ?18:34
beunoPeng_, want to write a patche for --no-plugins?   :)18:34
beunojelmer, it tries Branch.open()18:34
Peng_beuno: --no-patches. :P18:34
jelmerPeng_, depending on how loggerhead is trying to open branches, 0.5 fixes that issue18:34
beunoPeng_, also, without bzr-svn, is the memory usage down?18:34
Peng_beuno: Yes, it is.18:35
beunoPeng_, w00t!  by how much aprox?18:35
jelmerbeuno, ah, thanks18:36
jelmerPeng_, so, yes, bzr-svn 0.5 should fix the memory usage issue18:36
beunopoolie, lifeless, james_w  ^^^ LH memory usage down, but still blows up on production18:37
Peng_beuno: Oh, right. I forgot about the improvements. I can't really say at this point; all I can say is that disabling bzr-svn stopped it from constantly growing.18:38
Peng_jelmer: You figure 0.5 is usable enough at this point that I can try it safely?18:38
Peng_Hmm, I'm not even sure I ever use bzr-svn on that machine.18:38
jelmerPeng_: Yes, I think so18:39
jelmerPeng_, There was a similar bug a while ago in "bzr multi-pull"18:39
seb_kuzminskyi did "bzr svn-import --schema=trunk" and still it gave me a single bzr branch with /trunk, /branches, and /tags18:40
jelmerseb_kuzminsky, you want --scheme=trunk018:41
seb_kuzminsky"bzr branches" returns without producing any output, and "bzr heads" shows just one head18:41
seb_kuzminskyjelmer: oh ok18:41
pooliehi jam, beuno, lifeless18:42
jamhi poolie, how is mountain view?18:42
jelmerseb_kuzminsky, though I think it should yell at you if you use --schema18:44
jelmer(since that is not a valid argument)18:45
seb_kuzminskyhrm, sorry, i did type --scheme, my bad18:46
seb_kuzminsky--scheme=trunk resulted in no branches in the bzr repo18:46
* Peng_ tests bzr-svn 0.5.18:46
seb_kuzminskytrying --scheme=trunk0 now18:46
jelmerseb_kuzminsky, in that case trunk0 won't help much I think18:46
jelmerseb_kuzminsky, you might want to try 0.5 as well then18:46
seb_kuzminskyjelmer: yea after "bzr svn-import --scheme=trunk0" i still have no branches18:49
seb_kuzminskythat's ok, i didnt really want my branches anyway....18:49
jelmerseb_kuzminsky, you can get the individual branches manually by running "bzr branch <repos-path>/trunk my-trunk"18:50
mwhudsonmorning18:50
jelmerhey mwhudson18:50
seb_kuzminskyjelmer: right, good idea18:50
seb_kuzminskyjelmer: i'm doing this on the machine that hosts the svn repo and i'm using file:// urls to the svn repo, might that have anything to do with the problem?18:52
jelmerseb_kuzminsky, no, that shouldn't matter18:53
jelmerseb_kuzminsky, I think it's just a general problem causing bzr-svn to use the guessed scheme rather than the specified one18:53
seb_kuzminskyok18:53
jelmerseb_kuzminsky, I think it's fixed in bzr-svn 0.5.0~rc118:54
jelmerseb_kuzminsky, looking at the code, I'm sure it's fixed in 0.518:56
jelmerseb_kuzminsky, did you only just start using the trunk/, branches/ structure?18:56
seb_kuzminskythe svn repo was created with that structure18:57
seb_kuzminskyit has two branches (plus trunk) and no tags yet18:57
seb_kuzminskyof the two branches, one is about halfway back in history, and the other is very recent18:57
seb_kuzminskyhistory is about 300 revs long18:59
Necorohmm - is pycurl needed for anything under linux?19:00
Necorobecause it is not mentioned anywhere - but in the logs there are lots of complaints about not finding it19:00
LarstiQNecoro: the only thing I can think of that it possibly adds over plain urllib is ssl certificate checking19:17
lifeless.join #ubuntu-foundations19:28
jamLarstiQ: maybe we should only make it the preferred default for https connections, rather than both http and https19:36
jamNecoro: we don't need it, we just use it if we find it, and log when we don't find it19:36
LarstiQjam: that sounds like an excellent idea.19:37
jamvila: what do you think?19:37
Necorojam: ah ok - the "DependencyNotFound" just sounded quite drastic and I thought whether it could be a reason for some errors ;)19:38
=== etank is now known as service_desk
=== service_desk is now known as etank
jamLarstiQ: patch submitted, though I want to hear what vila thinks before we switch19:48
* LarstiQ nods19:48
pooliehello jam19:51
jamhi poolie19:51
jamFor some reason the login you gave us before isn't working for me now19:51
jamtrying to follow your support request linke19:51
jamlink19:51
poolieah :/19:51
jamI was able to use it just this morning19:52
pooliei reset my password because i didn't have it on my laptop :)19:52
jamwhen I wanted to try myself19:52
pooliecan you encrypt it and send it back to me19:52
poolieplesae19:52
jamsure19:52
poolieplease*19:52
jampoolie: sent19:52
poolieok, it's reset back to that19:54
poolieso you're welcome to use that to file or comment on support requests19:55
pooliejust login as mbp@canonical19:55
Peng_If http defaults to urllib and https defaults to curl, and an http url redirects to https, will it still switch to curl?19:55
poolieyes19:59
Peng_:)20:01
lifelessabentley1: mirror stuff: init-branch .; set-stacked(mirror_url);pull (official-source)20:06
=== Mario__ is now known as pyg
=== pyg is now known as pygi
jampoolie1: the only support ticket I see is the "System is not available as the server is currently stopped" ticket20:25
jamwhich I don't think is the same20:25
poolie1it is the same, i added on to that ticket20:26
jamah, I see it now20:26
jamyeah20:26
poolie1because they broke this while trying to fix the first20:26
=== poolie1 is now known as poolie
jelmerIs it possible to commit when one of the parent revisions is a ghost?20:43
jelmerIn particular, what sort of arguments should CommitBuilder.record_entry_contents() receive in that case, since it requires a list of parent inventories.20:45
=== Hydrogen_ is now known as Wasserstoff
lifelessjelmer: its a little tricky:)20:48
lifelessjelmer: but yes, and its tested for commit.py, in bzr's test suite; I don't recall the exact mapping to CommitBuilder though20:49
jelmerlifeless, thanks, I'll have a look there20:50
strkhow to update to a specific revision ?21:18
strkbzr help update doesn't tell?21:18
jamspiv: are you around?23:03
seb_kuzminskyi've got a rich-root-pack repo on a server running bzr 1.10rc123:05
seb_kuzminskywhen i try to checkout using hardy (bzr 1.3.1), it fails because it makes the local repo (on the client) pack-0.9223:05
jamseb_kuzminsky: I believe it is a known bug in older versions of bzr23:06
jamfixed somewhere around 1.623:06
seb_kuzminskythanks jam, that was quick :-)23:06
seb_kuzminskyhardy backports has only 1.3.1...23:06
seb_kuzminskyit's easy enough to work around by creating the repo explicitly before doing the checkout23:07
spivjam: yep23:07
jamspiv: so I was wanting to implement a FIFO cache, similar to our LRUCache23:08
jamand basically, on *access* I don't need to do any work23:08
jamjust on add() do I need to possibly pop things out of the cache23:08
jamand I was hoping to have it have minimal overhead23:08
jambut if I try to do "self.__getitem__ = self._adict.__getitem__"23:09
jamI get a "readonly" attribute error23:09
spivRight, __getitem__ is special, because it's an operator.23:09
jamSo the next thing I tried was to subclass a dict23:09
spiv(You could do that in a classic-class, but not a new-style class)23:09
jambut: TIMEIT -s "x = {10:20}" "x[10]"23:09
jamis about 0.07us23:10
jamand using the subclass23:10
jamit is 0.2 us23:10
jamor not quite 5x slower23:10
* spiv tries23:10
jameven worse is doing def __getitem__(self, k): return self._d[k]23:10
mwhudsonoh right, dict.__getitem__ is special cased in the interpreter look i think23:10
jamwhich is about 0.6us23:10
jamor another 2-3x slower than subclassing dict23:11
mwhudsonloop23:11
jamso if I wrote a C class23:11
jamwhich subclasses __dict__23:11
jamwould it be possible to get the same performance, mwhudson?23:11
mwhudsonjam: no23:11
jamit checks the type first?23:12
mwhudsonyes23:12
jamnot the attribute23:12
jam:(23:12
mwhudsonthink so, anyway23:12
spivjam: I only see about a 30% speed hit for a subclass23:12
spivjam: well, for a trivial dict subclass with no logic23:12
mwhudsonactually23:12
mwhudsonmaybe i'm lying23:12
jamspiv: well, I only special cased __setitem__23:12
jamI'll try without that23:13
mwhudsonit's list[int] that's special cased, it seems23:13
jamI still see 0.06 versus 0.2423:13
jamI'm on win3223:13
jamwhich makes a difference23:14
jambut still23:14
spivjam: on, hmm, now I get numbers more like yours, it seems a package upgrade in the background was skewing my timings23:14
=== visik7_ is now known as saltapozzanghere
jamnow the 30s I was seeing is more about LRUCache.get() overhead23:15
jamwhich has to record the access for the LRU part23:15
jamI'm sure a FIFO would still do a lot better23:15
jamI was just hoping to remove all overhead through some sort of magic23:16
jamsubclassing dict still gives 2:1 benefit versus using a dict23:16
spivjam: there's already a collections.deque, btw23:16
jamspiv: true, but I want a dict23:17
jamnot a list23:17
jamso I want to use a dict + deque23:17
jamand when the dict gets full23:17
jampop things out of the deque23:17
jamand remove them from the dict23:17
spivSounds like a weird FIFO :)23:17
jamIt would only *have* to override __setitem__23:17
jamspiv: FIFOCache23:17
jamsorry I wasn't more explicit23:18
spivOh, right.23:18
jamversus the LRUCache23:18
jamwhich we have in bzrlib now23:18
jamI also wish I could implement it with a list, because I've also seen deque slower than a list23:18
=== saltapozzanghere is now known as visik7
jamprobably because of stuff like mwhudson's inlining of list[int]23:18
jammwhudson: is tuple[int] also inlined?23:18
spivlists are pretty quick.23:18
jamthat would make sense to me23:18
spivAlso because lists are very simple.23:19
jamspiv: yeah, lists are certainly faster, for everything except stuff like a real FIFO because they aren't double-ended23:19
jamso pop(0) has to reallocate and move the whole list23:19
mwhudsonjam: no23:19
jammwhudson: interesting. Considering how tuples themselves are so much faster, and internally python uses tuples for lots of things, like arguments, etc.23:20
mwhudsonjam: micro-optimizing the python interpreter has a long history, which may not be entirely coloured with sensible-ness23:20
spivRight, but moving the whole list is fairly fast, depending on the size of the list.  That is, although pop(0) scales O(n), the constant factor is quite low, so you may need a pretty large n for it to be slower than a deque.23:21
jambut yeah "list[int]" == 0.0495us, and tuple[int] == 0.0712us23:21
jamfor a list of 10k entries23:24
jam.pop(0) seems to take 7us23:24
jamsorry 9us23:25
jamat the same time, I can't *measure* the time for deque.pop()23:25
jambecause the time to build the deque causes enough noise to make it unreliable23:25
jambut I would guess significantly less23:25
jamsomething around .2us23:26
jamdoing the "wrong" thing of creating one long enough to not have to recreate it.23:27
jamdeque(range(10000)) takes approx 300us, versus list(range(10000)) taking only 50us23:27
spivjam: so if I make the timeit inner-loop be pop(0)/popleft(); append(1), I get 0.43µs for deques vs. 18.7µs for lists. (with 10000 elems).23:29
jamseems about what I'm seeing23:30
jamfor the pop + append, I see 0.293 for deque, and for pop(0)+append I see 7.7us, for pop + append I see 0.391us23:31
jamI'm actually surprised to see y.pop(); y.append(1) being slower with a list than a deque23:32
jambut it is consistent with 20k nodes as well23:32
jam0.4us versus 0.28us23:32
spivRight.23:34
jaminteresting BLOCKLEN=62 for deque23:34
jamI'm curious how they came up with that23:34
jamI suppose it is the freeblock cache?23:35
spivI have no idea :)23:37
mwhudson62 probably gave optimum results on raymond hettinger's computer23:37
jam:)23:38
jamI assume there is some amount of tradeoff between wasting space and lots of malloc calls23:39
jamAnd I would imagine it depends dramatically on your workload23:39
jamlots of 50-node deques, versus 1M deques23:39
jamspiv: are you working, btw, or just wasting your vacation time on IRC :)23:39
spivjam: working :)23:40
spivjam: the wasting holiday time on IRC was last week.23:40
jamok, I don't feel bad for pinging you, then23:40
eartha`I have file in bzr.23:46
eartha`I want to do a commit once a week in a cron job23:46
eartha`do I need to cd to the directory that holds the file under bzr?23:46
eartha`I mean do I need to write the cd into the script?23:47
mwhudsoni think bzr ci /absolute/path/to/file will work23:47
eartha`thanks mwhudson23:48
mwhudsonbut try it!23:48
=== mw_ is now known as mw
CraPoLahttp://chatroll.com/chatroll-pub#223:48
CraPoLacome free beer23:48
eartha`I certainly will.23:48
CraPoLayou will good lol23:49
CraPoLawhre u from eartha23:49
eartha`earth23:49
CraPoLayeah me to lol23:49
CraPoLanow the geophrapic location would be nice23:50
CraPoLaaustralia here23:50
eartha`same here23:50
CraPoLagood23:50
CraPoLawhat this site about23:51
eartha`?23:51
eartha`site23:51
CraPoLathe irc channel23:51
CraPoLathe one you on23:51
eartha`bzr is a version control system23:51
eartha`bazaar23:51
CraPoLa??23:51
CraPoLalike a server23:51
eartha`as in the "bazaar and the cathedral23:52
CraPoLahmm lost me here sorry23:52
eartha`no, more like document change tracking.23:52
CraPoLaahhh ok23:52
CraPoLacool23:52
eartha`Or more usually, for source files23:52
CraPoLaso what do u do with them23:52
CraPoLado you work for a government place23:53
eartha`put your project/ documents/source files in version control and then if you change something that does not work, you can go back to a version that does work23:53
eartha`In my case I have a file which needs to be printed out once a week for legat reasons.23:54
CraPoLacool23:54
eartha`I want to have a weekly snapshot of the file so that if required I can print out the weekly version if requested, insteadof wasting paper.23:54
CraPoLaso the link above planet-bazaar-vcs.org is where i go23:55
eartha`I guess so.23:55
eartha`what os are you on?23:55
CraPoLame Vic23:55
eartha`operating system23:55
eartha`windows/freebsd/linux23:55
CraPoLall have a look at his eartha looks cool23:57
CraPoLaurself what part of oz23:57
eartha`nice talking, have to get back to work.23:57
eartha`nsw23:57
CraPoLanice23:57
CraPoLaok later23:58
eartha`ooroo!23:58
CraPoLacya23:58

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