/srv/irclogs.ubuntu.com/2010/09/18/#bzr.txt

vilaping losa00:19
vilalosa: nvm00:20
=== Leonidas_ is now known as Leonidas
knittlif i do cat-revision which format is that? serialized?09:53
fullermdWell, of course it's serialized.  That doesn't really say anything; it's like saying "it's bytes"   ;p10:23
fullermdLooks like an arbitrary length-specified k:v serialization to me.  But I don't know any more than you would by looking at it.10:23
knittlfullermd: i'm not a python expert, so i can't say what this format is10:26
fullermdWell, I'm not a python anything.  I can still read and guess, though.10:27
knittlthat's why i asked, to seek help, not to get flamed10:27
knittli can do guessing too10:27
knittlbut guessing does not help10:27
fullermd'course it does.10:28
fullermdinventory-sha140:ddc195c05e78e0713a61f2b046a5a27d4f8b8b87el710:28
knittlel7?10:28
fullermdNow, it could be that that's actually a unique spelling of Estruscan.  Or, the most obvious interpretation could hold, and since a SHA1 is 40 chars, somebody along the line would have to be pretty dumb for that to mean anything but "field 'inventory-sha1' is 40 chars, the content of which is 'ddc19...'"10:30
knittlfullermd: i got so far10:30
knittlbut i'm stuck with el710:30
knittland #bzr is really the worst place to seek help10:31
fullermdWell, every value looks liek it ends with el<somenum>, and that somenum looks like the length of the following key.10:31
knittlthere is el eel ll ee …10:31
knittlor d10:31
spivknittl: you're probably seeing bencode10:39
spivknittl: but cat-revision is really just a debugging tool10:40
spivknittl: the format of the output depends on the format of the repo10:40
knittlspiv: bittorrent encode?10:40
spivknittl: e.g. on earlier formats you'd get XML10:40
spivknittl: right10:41
knittlok, so it's not even serialized it's really the revision as stored byte for byte?10:41
spivIt's the text of the record in the 'revision' store10:41
knittlok great. thanks :)10:41
spivWhat a user calls a 'revision' has a bit more in it than that :)10:42
spivYou can say that it's some sort of serialization of a Revision object.10:42
knittlok. bencode helps a lot already10:43
spivOut of interest, why are you looking at cat-revision?  Just poking around?10:43
knittlmore or less poking around10:43
spivGood :)  So I won't feel obliged to stress how much cat-revision is not an interface to be building on top of ;)10:44
knittlspiv: no, i'm not using it to write scripts10:44
knittli'm really only interested in the data and the format10:44
spivAt a moderately high level, the data model is that there are revisions (which have a unique ID).  Revisions have an inventory (which often, but not always, shares that ID), and inventories describe what's in the tree and refer to the exact file texts.10:46
spivThe four stores, or "versionedfiles" as the code tends to call them, are 'revisions', 'inventories', 'texts' and 'signatures'.10:47
knittli think i already figured that out10:48
spiv(A revision's signature will have the same ID as the revision, but obviously will be found in the signatures store, rather than the revisions store.  Also, a revision does not need to have a signature, it's optional.)10:48
knittlalso testament being a stripped version of a revision10:48
spivWell, the testament is a serialization of a revision suitable for signing.10:48
knittlyes10:49
spivi.e. even if the repository format changes, the testament won't.10:49
knittlactually there are already 3 different testament versions ;P10:49
spivWell, ok, yes :)10:49
spivThe actual details of how these high-level things are stored as bytes and files on disk in .bzr/ is somewhat complex.10:50
spiv\\\10:50
fullermdI have vague memories that one of the testament formats was actually just made for some bundle format or other.10:50
knittlso to verify a signature the text of the testament has to be parsed10:50
spivTo see if it matches the data you have in your repo, right.10:51
knittli have a patch lying around10:51
fullermdI don't think that happens by parsing the testament, though.  Rather, from just using the data bits the testament was generated from.10:51
knittlbut it's not parsing yet10:51
knittlonly looking if the testament text is contained in the signature10:51
knittlfullermd: i'm talking about printing the signature and verifying the testament which is signed by it10:52
knittlit only stores the text of the testament10:52
knittlso the signed message has to be parsed10:52
spivThe signed message is very simple, though.  It's basically "I am testament for revision-id blah, the SHA-1 of the long testament is blah", IIRC.10:55
knittlyes10:56
knittlbut still needs to be parsed (textwise)10:56
fullermdI would assume that the stored signature doesn't actually include the testament text, that the validation process actually goes "Generate a testament for the given rev from the information I have, then check if the signature matches it"10:56
lifelessthe signature is of the hash of the testament10:56
lifelessyou don't need to parse that10:56
lifelessyou just generate a new testament and hash that10:56
* spiv -> dinner10:57
knittlsignature is: begin signed message------hash sha1 "testament text"----begin signature----end signed message10:57
knittlhttps://code.launchpad.net/~knittl/bzr/show-signature10:57
knittlhttps://code.launchpad.net/~knittl/bzr/cat-signature (new name)10:58
knittlbut i don't have time for that now though11:00
knittlspiv: when you are back from dinner: where can i find the code for 'text' objects?11:18
fullermdYou could try tracing down from the 'cat' command, since that winds up giving you the text for a particular file at a particular rev.  Would be my first thought of how to find it.11:25
knittlmy first thought is to search for a file called text*.py11:27
knittlbut i guess there are multiple files11:27
knittlweave, knitpack, etc.11:27
spivknittl: versionedfiles.py, groupcompress.py11:40
knittlspiv: thanks a lot :)11:40
spivknittl: you could perhaps try drilling down from bzrlib/repofmt/groupcompress.py11:40
spivWhich implements the current repo format.11:40
spivBut it'll be a tough dig, there are many layers of abstraction...11:40
knittllike everywhere in bzr? ^^11:40
* fullermd carefully remains mute :)11:41
spivAt a high level the API is essentially just "these are the bytes of (file-id, rev-id)", "please give me the bytes of (file-id, rev-id)".11:41
knittli'll look into versionedfile first11:42
knittli guess there are properties which are common between different formats?11:42
spivBut obviously the storage has various smarts about compression and deltas.11:42
spivYeah, it's mostly been evolution not revolution with formats.11:43
spivSome evolutionary steps are bigger than others, of course ;)11:43
knittlok, afk now – dinner11:43
knittlspiv: helps a lot already, spiv11:44
spivAnd, even in that high-level view, you ought to be aware that just because rev X contains a file of id F that doesn't imply that (F, X) exists in the texts store.11:44
spivBecause if that file hasn't changed in that revision it won't get a new texts record.11:45
spivSo to find the contents of a file in a particular revision, you need to ask the revision for its inventory, ask the inventory for the (file-id, rev-id) to use, and then ask the texts store to extract that for you.11:46
spiv(or use a high-enough level API that does all that for you ;)11:46
spivAt some point I'd love to make a document describing all the most important abstractions, and their gotchas and subtleties...11:48
spivThe really low level bits are fairly well described in various places already, if you already understand where they fit into the big picture.11:48
fullermdAnd writing that should take only slightly less time than it takes to obsolete it   8-}11:49
spivThere's also the "but I could be spending this time fixing bugs" problem.11:50
astraljavaHi there, anyone know why `bzr lp-login user' fails with http://paste.ubuntu.com/495833/, while `ssh -v user@bazaar.launchpad.net' says login succeeded.12:19
fullermdThat's an error from curl about verifying the SSL cert on launchpad.12:22
spivastraljava: lp-login first fetches something via HTTPS, but your system's libcurl doesn't have whatever certificate authority cert is needed to validate SSL.12:22
spivEr, SSL to launchpad.net, that is.12:23
astraljavaspiv: Okay, thanks. How can I get past this?12:23
spivA workaround would be to uninstall python-pycurl12:23
spiv(on debian/ubuntu)12:23
astraljavaRight, ubuntu it is. Thanks, I'll give it a go!12:24
spivThen bzr will fallback to Python's builtin HTTPS stuff, which doesn't try that validation.12:24
spivOr, install more ca-certs ;)12:24
* spiv -> zzz12:24
astraljavaspiv: Thanks, that worked. I'll look into installing LP's cert though, that's somehow better in my view. :) G'night!12:26
vilaastraljava: yup, Ubuntu not carrying lp cert is a bug, which version ?13:11
vilaastraljava: bzr not allowing you to disable cert verification is another ;-) More or less related to bug #82086 which you can subscribe too or just mention you're affected by13:16
ubot5`Launchpad bug 82086 in Bazaar "pycurl transport causes tracebacks if the server's SSL cert cannot be verified. (affected: 3, heat: 46)" [Medium,Confirmed] https://launchpad.net/bugs/8208613:16
vilaping losa13:17
Glenjamini've got a branch that adds --ignore-whitespace to qdiff, could anyone point me to how i'd go about getting that into trunk?13:27
GlenjaminShould i file a bug and attach a patch, or do something with merge requests?13:27
astraljavavila: Gotcha, thanks!13:38
vilaGlenjamin: merge request is the way to go, it's best when there is an existing bug though13:39
vilaGlenjamin: bialix and GaryVDM are the best to answer about qbzr and bzr-explorer13:40
Glenjaminbah, i've found another pending merge request that doesn't have a bug which does roughly the same thing13:48
Glenjaminalthough that branch does a bunch of other stuff too13:48
Glenjaminpresumably there's bugmail for these things, and I shouldn't be poking people?13:50
vilaGlenjamin: I can't speak for qbzr, I don't propose a lot of mps there :-/ But surely they'll receive mails when you create a new one or add a comment there13:58
vilaGlenjamin: and, generally, smaller proposals are easier to review/test/land13:59
RainCTHi16:53
RainCTIs there some way so that if I have lp:foo Launchpad won't allow merging lp:foo into another branch and pushing that branch to lp:foo (but instead require the other branch be merged into lp:foo)?16:53
RainCTOr more useful, is there some way to uncommit the last changes to recover a revision which is now X.Y.Z?17:02
fullermdIf you could get append_revisions_only set on the branch, it would refuse changes that change the existing revnos.  Not sure there's a clean way to do that to a branch on LP though.17:03
fullermdYou could use push --overwrite to move the branch head back to whatever rev you wanted.17:03
RainCTfullermd: The later question is about doing it in local when I don't have the original branch. (The problem I have is I want to fork out the code of a stable release to work on a bugfix-only release, but it's got lost in the middle of a big merge).17:06
fullermdWell, you can make a new branch starting from any rev you want; it doesn't have to be the current head, or on the mainline.17:06
fullermdYou can `bzr branch -rX.Y.Z trunk bugfix-release-branch` and go from there.17:07
RainCTfullermd: Oh, that even works. Thanks!17:09
=== vila changed the topic of #bzr to: Bazaar version control | try https://answers.launchpad.net/bzr for more help | http://irclogs.ubuntu.com/ | Patch pilot: vila | Release Manager: vila | bzr 2.2.0 is officially out| bzr-2.0.6, 2.1.3 and 2.2.1 need installers, atdhvaannkcse ! | work on bzr: http://webapps.ubuntu.com/employment/canonical_BSE/
maxbRainCT: If you want to enable append_revisions_only on a Launchpad branch, you can do it via the bzrlib API, or you can edit the branch.conf over sftp18:28
maxbatdhvaannkcse ?!18:30
dashconcurrency bug18:31
RainCTmaxb: Thanks. What's the URI for sftp?18:31
maxbRainCT: Usually I use sshfs to mount the branch via fuse (because I've yet to find a sftp client that provides a better experience)18:32
maxbSo, 'sshfs bazaar.launchpad.net:~foo/bar/baz /tmp/mountpoint'18:32
maxbAnd then write 'append_revisions_only = True' in .bzr/branch/branch.conf18:32
vilamaxb: thanks in advance with, as dash said, some concurrency bug ;-)18:53
vilamaxb: wow, you really don't care about bandwith nor latency do you ? bzr+ssh should be better than sftp for lp18:53
vilamaxb: Ha, no, only for accessing branch.conf, sry, missed the beginning18:54
* vila off18:54
=== Ursinha-afk is now known as Jorjao
=== Jorjao is now known as Ursinha
=== Vorpal is now known as Vorpal_
=== Vorpal_ is now known as Vorpal
=== Vorpal is now known as Vorpal_
=== Vorpal_ is now known as Vorpal
lucidfoxCan I mark multiple LP bugs fixed by the same commit?21:11
lifelessyes21:25
lucidfoxhow?21:27
lucidfoxAlso, how do I clear pending merge tips?21:28
maxbspecify --fixes multiple times, iirc21:28
maxbbzr revert --forget-merges21:29
maxbassuming you only want to clear the merge metadata, not also revert the tree21:31
=== Ursinha is now known as Ursinha-afk
lifelessmkanat: around? questions about lp comments in the mozilla buzilla in #launchpad-dev if you are23:47

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