/srv/irclogs.ubuntu.com/2008/01/13/#bzr.txt

Kinnisonthen look at bzrlib/smart/medium.py00:01
Kinnisonand tell me how on earth bzr_access could ever work00:01
* Kinnison pouts prettily at jelmer00:02
Odd_BlokeKinnison: Presumably if you're using bzr:// and not bzr+ssh://, IIR this problem correctly.00:05
Kinnisonbzr_access is explicitly for bzr+ssh though00:09
Odd_BlokeThen I don't recall this problem correctly. :p00:09
Odd_BlokeSorry. :(00:09
Kinnison:-(00:13
Kinnisonbzr:// uses a tcp connection00:13
Kinnisonwhich is fine if you can trust the network between you and the server00:13
Kinnisonsftp:// is slow, lacks remote hooks, but works for untrusted networks at the expense of needing a unix user per person who can access trees00:14
Kinnisonbzr+ssh with bzr_access had promise, but has turned out to be useless00:14
* Kinnison sighs00:14
=== brilliantnu1 is now known as brilliantnut
=== brilliantnu1 is now known as brilliantnut
ubotuNew bug: #182469 in bzr "Bazaar has encountered an internal error: exceptions.MemoryError: " [Undecided,New] https://launchpad.net/bugs/18246905:41
ubotuNew bug: #182477 in bzr "bzr crarshing when trying to commit to the APT repository" [Undecided,New] https://launchpad.net/bugs/18247706:51
=== pbor|out is now known as pbor
=== GaryvdM_ is now known as GaryvdM
=== cfbolz_ is now known as cfbolz
MWintherEeey... How do I enable bzr support in emacs?20:10
Verterok-laptopMWinther: I don't use emacs, did you look: https://launchpad.net/vc-bzr ?20:12
MWintherVerterok: Oh, thanks... I missed the instructions in the comments.20:15
Verterok-laptopnp, glad to help ::D20:16
Lo-lan-doHi all.  I'd just like a confirmation: private branches can be rebased, but as soon as they're made public they should only merge and pull, right?20:25
datoyeah20:28
Lo-lan-doOut of curiosity, what happens if I rebase a branch that someone else has already branched?20:30
jelmerLo-lan-do: yes; other than for bzr-svn (which can only track lhs history) there shouldn't be much reason to use rebase20:31
jelmers/which/because it/20:31
jelmerLo-lan-do: Next time they pull they will get a branches diverged error20:32
jelmerLo-lan-do: and if they merge afterwards, the rebased revisions end up twice in "bzr log"20:32
Lo-lan-doOh.  Right, I'll refrain then :-)20:32
datoone use case is for right before pushing20:32
datoif you notice you're diverged, you rebase and push20:33
Lo-lan-doI see.20:38
Lo-lan-doSay, is the LCA merge algorithm the default in 1.1?20:39
Lo-lan-doI've read it's the bee's knees, so if it's really better I guess I should replace --weave with it in my scripts?20:40
* rjek wonders idly if there's a bzr-cvs.20:42
rjekI suppose it's more of a faff due to the lack of changesets.20:42
Lo-lan-dorjek: The website says there isn't20:42
Lo-lan-do(I wondered the same thing yesterday)20:42
rjekI just want to import another project's source tree into mine.  It'd be nice to have history, but it's not essential.20:43
Lo-lan-doI'd suggest cvs2svn then bzr-svn20:43
thumperrjek: it is possible to import CVS to bzr using launchpad20:43
thumperrjek: if it is open source20:43
rjekthumper: It is - it's on sf's CVS server.20:43
rjekI only want to make a handful of changes to the source stored in CVS for my own purposes, it's more about reproducability than version control tbh.20:44
thumperrjek: luanchpad uses cscvs to import cvs to bzr20:44
rjekDoes cscvs have advantages over cvs2svn?20:44
thumperrjek: I don't really know that much about it20:45
thumperrjek: except cscvs goes from cvs -> bzr20:45
thumperrjek: rather than cvs -> svn20:45
rjekWell, yes - there's an advantage in removing one of the steps, clearly.20:45
thumperI'd be curious to see how cvs-svn, then bzr-svn works20:45
rjekBut I know bzr-svn does a good job.20:45
rjekSo if cvs2svn does a good job, you'd hope the output would be high-quality.20:46
thumperrjek: one of the things that cscvs does is it tracks CVS changes20:46
thumperrjek: rather than a one-off conversion20:46
rjekThat might be more useful, tbh.20:46
rjek(ie, that *is* an advantage I would be interested in.)20:46
rjekthumper: What's involved in getting Launchpad to track a CVS repository for me?20:54
thumperrjek: https://help.launchpad.net/VcsImports20:55
rjekTa20:55
* rjek mutters at Launchpad.21:10
rjekApparently, optional fields are compulsory.21:10
thumperrjek: instead of muttering, file a bug :)21:18
rjekI wish to use Launchpad for the minimum amount of time I can get away with :)21:20
thumperrjek: why?21:20
thumperrjek: best to move this conversation to #launchpad21:21
rjekI generally find it hateful.21:21
dleeI'm realizing I'm sort of swimming upstream here... trying to find a nice way to at least convert, if not actively track, cvs to bzr; but we have about 40 projects in cvs on a FreeBSD system with people using Windows CVS clients to check in and manage Windows projects.  The projects contain mostly Windows text but also some binaries.21:31
rjekI'm told cscvs is the way Launchpad does it.  I'm also told Tailor, once set up, can nicely do incremental imports.21:32
dleeI believe bzr *always* checks in/out exactly what you send in:  Check in text from windows, check out CRLF no matter where you are.  But cvsps-import gets LF only from CVS in all cases I've tried, so cvsps-import can't currently manage the conversion because all checkouts would be LF-only even under Windows...21:32
dleeDoes anyone know if cscvs (which I hadn't heard of until now) could help with this at all?21:33
lifelessdlee: so the limiting factor here is we haven'timplemented line ending translations21:34
dleerjek:  I've used Tailor to some good effect with CVS (it *will* do CRLF properly it seems), but in my experience, it fails to notice CVS tags, so they don't show up on the Bzr side.21:34
lifelessdlee: the 'right way' to convert your repository is to convert it in binary form and then use line ending translation to get the text files to be checked out as text files on windows21:35
dleelifeless:  Could be thought of that way.  Could also be said that the limiting factor is Windows insists on an annoying EOL translation. :P~~~21:35
lifelesswell, older macs have different EOL to unix and windows21:35
lifelessso its a general problem21:35
dleeBut anyway... I'd be fine with putting CRLF in Bazaar so everything on the Bzr side checks in/out with no translation... unless (I) someone knows a reason against that, or (II) I can't find a solution before Bzr implements such translation21:36
lifelessI think you will have to hack up a solution - editing cvsps for example21:37
dleelifeless: point.21:37
dleelifeless:  I tried hacking cvsps-import but not cvsps itself.21:37
dleelifeless:  Isn't it true though that, if I check in text on Windows, it becomes CRLF inside the Bazaar branch?21:38
dleeMy reason for thinking it would be best to get things in as CRLF and then not need translation is, mostly, that I thought that is what will automatically happen for new projects we do anyway.21:40
lifelesscurrently bzr just stores the bits untranslated21:41
lifelessso if your editor makes CRLF, you get CRLF21:41
lifelessI meant hacking cvsps-import actually ;)21:41
dleeRight... so in my mind at least, adding CRLF translation won't really help us here unless it happens before we kick off the whole CVS-to-Bazaar conversion, because currently, all projects either will by default, or must for consistency be made to, be stored as CRLF internally in Bazaar.21:43
dleeMy knowledge of Python remains limited, but my last experiment there was to try using universal_newlines.  I suspect subprocess.popen.communicate() (if that's the right object hierarchy) of quietly converting CRLF to LF.  Cygwin could also be doing it for pipes though it doesn't for output redirection I guess.21:45
lifelesswell21:46
lifelesscvs will ahve everything stored in LF at the moment21:46
lifelessthere used to be flags for this in the cygwin environment21:46
dleeI suppose the next shot I'd have is to pass all cvs/co output through an output-to-file, read-from-file sequence, and see if that preserves line endings.  But I have a better idea that I don't know how to do:21:46
dlee(I do have MSDOS endings set in Cygwin, yet all this still happens)21:47
dleeBetter idea, if it can be done:  Add a cvsps-import flag that makes it convert to CRLF on CVS files that do not have -kb set.  Sound?21:47
dleeI like this better because it's OS-independent, and I could mass-convert all 40 projects on the same fbsd system where the CVS repos are. :)21:48
lifeless-kb isn't a historical setting IIRC21:48
lifelessif it is then sure21:48
lifelesshmm, actually paging it in - it is21:48
dleeSorry... if you're doing serious work, don't swap on my account. :-)  But the help is sure appreciated.21:49
lifelessI think thats a reasonable short term strategy21:49
lifelessthe downside is that when bzr gets this natively all your text files will see a full-file diff21:50
dleeIf/when bzr includes LF translation, won't we need a way to convert existing branches to an internal standard too?  The best I can imagine is svn-like properties, where you flag a file as one ending type or another to make Bzr (I) standardize it internally and (II) spit it out according to the given type.  Not sure whose project endings are though...21:52
dleeScenario:  Under Windows, I check in text.txt and word.doc.  They are both stored without translation--text.txt as CRLF and word.doc as what it is.  If I check out on Unix, I get the same--CRLF and doc.  Then native ending support comes in...21:54
dleeIf what you're saying is true, I'd see a full file diff on those then too, even though I hacked nothing.  And I think it's inevitible, unless we deal with the branch conversion as a sort of upgrade-type thing.21:54
dleethose == text.txt21:57
dleeHmm...I guess internal conversion is optional as long as flagging a file as specifically CR, CRLF, or LF forces (I) output (co etc.) translation and (II) input-time translation to ending type detected in existing branch copy.  I imagine it'll be done though as input-time translation to specified type, and *maybe* output-time also.22:03
lifelesswe have  wiki page about it22:04
lifelessbzr line ending something or other - google FTW22:04
dleelifeless: looking...22:08
igcmorning22:08
dleelifeless:  Not finding it...but I'll table all this until I do so you don't have to say a lot of stuff I should already know.22:16
lifelesshttp://bazaar-vcs.org/LineEndings22:19
mtayloris there a good internal API doc anywhere for bzr?22:19
mtayloror is poking through the code the best way to get a handle on things?22:19
lifelessthere are api docs22:19
lifelesson the web22:19
lifelesshttp://starship.python.net/crew/mwh/bzrlibapi/bzrlib.html22:20
lifelessthough I think thats an old copy, google isn't finding the newer one for me22:20
mtaylorlifeless: and that's just generated from pydoc stuff, right?22:21
lifelessI use 'pydoc foo' a lot22:21
mtaylorso the same info as in the docstrings22:21
lifelessyes, though it is richer than pydoc cause it hyperlinks22:21
mtaylorwell right... but it doesn't have an overview of like "a bundle contains a ... " or whatever22:22
lifelessmtaylor: there is also doc/developers/22:22
mtaylorlifeless: hm. maybe I'll look in tere22:23
mtaylorI'm working on adding bzr support to reviewboard22:23
mtaylorand I'm getting tired of reading source22:23
mtaylor:)22:23
lifelesse.g.22:23
lifelesshttp://doc.bazaar-vcs.org/latest/developers/bundles.html22:23
lifelesshttp://doc.bazaar-vcs.org/latest/developers/bundle-format4.html is probably what you are working with22:24
mtaylorlifeless: ah... yes, this looks like more what I'm looking for22:24
mtaylorlifeless: so, while I'm bugging you - if I have a branch and a bundle - the bundle contains a list of file ids and a list of revisions that go with the file ids22:26
mtaylorlifeless: so I should be able to get a path of the file for a revision based on revision id and file id22:26
lifelesshave you looked at the bundle buggy code? it has to do everything you are doing22:26
mtaylorlifeless: yeah - I was just about to start walking throught that22:26
lifelessbundles are not yet directly usable aas branches; they have to be installed somewhere, then you can get a revision tree of the revision the bundle introduced (or a delta, for cherrypick bundles)22:27
mtaylorI guess my question is... the bundle buggy code seems to merge_directive.install_revisions(branch)22:27
mtaylorah22:27
mtaylorok, that makes it much clearer22:28
mtaylorI was trying to think of a bundle as usable like a branch22:28
mtaylorok22:28
mtaylorsweet. thanks!22:28
mtaylorlifeless: so if I get a Branch, and then install the revisions of the bundle into the branch, I haven't actually applied that bundle yet, right?22:29
mtaylorabentley: hey - I added some patches to a local bundlebuggy to support multiple branches - are you interested in them ?22:31
abentleyInterested?  Sure.  What do they do?22:32
mtaylorabentley: so that I can configure a local repository containing more than one branch22:33
mtaylorand then bb can match a merge directive to the branch it belongs with22:33
mtaylorso you can manage more than one tree with one bb22:33
mtaylorshould I send them to you directly? or to the bzr.dev bundlebuggy?22:33
abentleyDirectly to me, please.22:34
mtaylorok22:34
lifelessabentley: oh hey!22:35
abentleylifeless: Hi.22:35
lifelessabentley: I was looking for you a few minutes back; I've just mailed about BreadthFirstSearcher and fetch22:35
lifelessabentley: how do you feel about me modifying the searcher to not return ghosts (including the start revisions if they are absent)22:35
abentleyI don't see anything yet...22:35
lifelessliterally just sent22:36
abentleylifeless: well, my gut says that's the wrong place to be filtering out ghosts.22:36
abentleyI see it now.22:37
lifelessI've had a poke around, and couldn't see any use case for it. ParentProvider needs to return ghosts; I don't think breadth first searching does,.22:37
lifelessbecause breadthfirst searching is already hiding ancestry and topological order details22:37
lifelessit could for instance return (next_revs, next_ghosts) if you like22:37
lifelessthat would be an api break I guess, so next_with_ghosts() or something for api transition22:38
abentleylifeless: I think we should be including ghosts in our APIs except where it's clear that they must not be present.  Otherwise, we are likely to get bugs related to hiding ghosts, and never know it.22:41
abentleyBug due to using ghosts when they should be ignored will be much more visible.22:42
lifelessthis is one22:42
abentleyAnd it's pretty visible, right?22:42
lifelessI agree with your point; however bfs is discarding data22:43
lifelessit knows what rev ids are ghosts22:43
lifelessit needs to propogate that information22:43
mtaylorabentley: sent22:44
lifelessor else we end up doing double-queries22:44
abentleylifeless: Propogating that info is completely reasonable.22:44
lifelessWhat do you think of the changed return value I suggest ?22:44
lifeless(or new on a new method)22:44
abentleymtaylor: got it.22:44
abentleylifeless: That would be fine on a new method, but I think the default method should just return revision_ids, ghost or not.22:45
lifelessI'd like to deprecate next() I think if I add a new method unless there is a good reason for having two query interfaces22:46
abentleyWell, I'd like to include ghosts by default.22:46
lifelessthey will be included22:47
abentleyWon't they be split into a different group?22:47
lifelessyes22:47
abentleyI think that ghosts should be not split into a separate group by default.22:47
lifelessI think that once we have identified the ghosts we should keep the separate22:47
abentleyI think that operations should only be paying attention to whether a revision-id is a ghost if this data is relevant to the operation.22:48
lifelessbecause otherwise we are forcing roundtrips on other parts of the code; or making other parts of the code be filtering when they should not22:48
abentleyYour proposed API would encourage people to do next()[0] even when ghosts should be included, because 95% of the time there aren't any ghosts.22:49
lifelessI think you are creating a source of performance / correctness bugs for users of that interface22:49
abentleyI have not proposed anything that would damage performance.22:49
lifelessI explained above how it hurts performance22:49
abentleyYour explanation suggests a misunderstanding of what I'm saying.22:49
lifelessanyhow, I'll do as you desire because my need will be met by the new method22:50
abentleyIf you want an API that splits out ghosts, fine.22:50
abentleyBut don't deprecate the old one.22:50
abentleyBecause it's worse for people to ignore ghosts when they should not than to pay attention to ghosts when they should not.22:50
lifelessI understand your motivation and agree in principal; on this particular API I think you are wrong.22:52
lifelessanyhow, -> doing the new method now.22:52
lifelessin particular returning the start revision ids for a search when they are absent from the repository is really hard to work with22:53
lifelessand thats just the special case of ghosts22:53
lifelessabentley: so I have a separate request; I want to modify next() to return StopIteration if the start revisions are all ghosts22:53
lifelessabentley: I don't have to, but please think about that22:54
abentleyWhy?22:54
lifelessbecause I spent the greater part of an hour while writing the pack fetch logic to handle that case; its sufficiently confusing as an api that there is a 5 line paragraph explaining code that uses it22:55
abentleyBut now you'll have an API that splits out all ghosts.22:55
abentleySo callers that don't want ghosts won't get any.22:55
lifelessyes, and I'll use that; I'm thinking of users of next, if people that want to use it do so22:56
abentleyThat seems like an inconsistency in the API.22:57
pooliehello22:57
abentleyIf you ask for 5 ghosts and 1 non-ghost, you get all of them listed, but if you ask for 6 ghosts only, you get nothing?22:57
lifelessyou're right I guess, I'll just write the more usable api I need and leave it at that. It feels wrong to have an api that discards information which is relevant to its callers is all22:58
abentleyBtw, one client that wants to keep references to ghosts is Graph.heads22:59
abentleypoolie: Hi.22:59
pooliehello22:59
pooliewelcome22:59
abentleyThanks.23:00
lifelessabentley: it does?23:02
abentleySure.  We can't assume a revision isn't a head if we don't know its derivation.23:02
lifelesswe can't assume it is either; I would expect us to signal that to the caller23:03
lifelesshmm, this means that we'll generate inconsistent last-changed revisions for baz imports, just in reverse order to how we used to do it23:05
abentleyIf the revision itself is a ghost, but is not reachable from candidate heads, it must be a head.23:05
abentleyWe may wind up with some false heads if some descendant is a ghost.  I don't think we can avoid that.  But we can know whether the ghost revision itself is a head.23:07
lifelessthe if the revision is /not/ a ghost, but is not reached, and we encounted ghosts, we cannot tell if it is a head or not, unless it reached the other heads23:09
lifelessif the revision is a ghost, it is not a head if it is reachable from some other head23:09
lifelessso yes we have to consider ghosts in heads(), but we need to know within heads() which are ghosts and which aren't to know whether to say 'head', or 'indeterminate'23:09
abentleylifeless: agreed.23:10
lifelesswe can avoid ending up with false heads if our api is allowed to signal that it could not determine the answer. Which any ghost handling api must be able to do23:10
lifelessthis is ok, it just means that we're not finished with heads()23:11
abentleyWhich is pretty reasonable since I implemented heads by accident :-)23:11
abentleymtaylor: these key lengths you're proposing don't seem to have any basis in specs.23:13
abentleyfor example, bug ids are URLs, and I don't think there's any length limit on URLs.23:14
abentleyEven IE can do 2048-char URLs.23:15
Peng_Apache can limit URLs. I once got a 400 Bad Request error or something for a 13,000 char URL.23:16
lifelesssquid limits to 4K at the moment, we're working on raising that23:18
abentleyPeng_: Sure.  But does the spec say anything?23:18
lifelessits not limited23:18
mtaylorabentley: yes... that's one of the things I wanted to talk to you about... is there a place I can find what those lengths should look look?23:18
mtaylorlook like, rather?23:18
abentleyWell, URLs have no length limit.23:19
abentleyI don't think email address do either, but I haven't checked as carefully.23:19
mtaylorah, I suppose if I read the next line in your response. :)23:19
mtaylorok. well then it might be a good idea to remove the lenght limit and introduce an artificial primary key there then23:20
ubotuNew bug: #182715 in bzr "Graph.heads() gives false heads sometimes" [Undecided,New] https://launchpad.net/bugs/18271523:20
mtayloras using a blob as a primary key is usually a really inefficient thing23:20
abentleymtaylor: That's why I've been slow responding to your first patch.23:21
mtayloroh, did I send one already?23:21
* mtaylor has a dead brain this week23:21
mtaylorI'll see if I can rework that23:21
abentleymtaylor: if the column is indexed, it shouldn't matter, should it?23:21
mtaylorno, it shouldn't23:21
mtaylorit's just that normally seconary indexes will contain a copy of the primary key so it knows how to point to the right row23:22
mtaylorso with a really big primary key, you wind up copying that data too much23:22
abentleySo with variable-length keys, do you still pay a penalty when the keys are small?23:23
mtaylornot necessarily - that's sort of db engine specific23:25
mtaylorbut in this case, elixir is making that column a blob23:26
mtaylorand most dbs have really bizarre implemenations of blobs at best23:26
mtaylorand in this case, mysql doesn't allow a blob as a primary key unless you specify a prefix length on the primary key23:26
rjekbranch-format: Unable to handle http code 401: Unauthorised23:27
rjekTsk.23:27
abentleyWell, I'm in favour of using artificial keys-- makes for cleaner URLs.  But I can't say I'm looking forward to adding migration code.23:28
mtaylorhehe23:29
mtaylorno23:29
mtaylorI was justing thinking that myself23:29
mtaylorI'll see if I can get it working and then send you a new patch23:30
abentleyAlso, renaming dev.cfg is okay, but I would prefer that it continue to specify SQLite.23:31
abentleyProbably I should roll config.ini into the TG config system.23:34
abentleyThat way we can stick all the local configuration in there.23:34
abentleyincluding databases and web paths.23:34
abentleyAlso, I don't think "tree" is the right term for branches.23:36
abentleyAlso, erroring if the target_tree is not going to work on bzr.dev-- *lots* of people don't set target_tree correctly.23:38
abentleyAlso, please don't comment-out code.  We have a VCS, so just delete it.23:38
abentleyWe can always get it back if we want.23:39
abentleyAlso, you've got '/buggy' in a lot of places where it shouldn't be.23:42
abentleySo I think the idea is an improvement, but there's some work needed on the implementation.23:43
* abentley heads out for groceries23:44
lifelessabentley: ok that patch is sent in23:58

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