/srv/irclogs.ubuntu.com/2010/12/15/#bzr.txt

wolfrageHello, I was wondering what is the impact of using Bazaar Explorer on a Git repository.00:14
wolfrageI have all of the proper tools for bzr installed like bzr-git. So far I have just found that it could not pull down a git repository.00:14
wolfrageIs any one in here?00:22
pooliehi00:26
poolieyes00:26
pooliewhat specifically fails?00:26
yhagerAre there any issues with python 2.7 (bzr, bzr-svn) - that should cause me to use python 2.6?00:38
spivNone that I know of00:40
wolfragepoolie: Sorry did not notice you responded. Well it appears that the git plugin is read only for git repos.00:42
wolfragepoolie: I was hoping to use a nice tool like Bazaar explorer to help me contribute to Telepathy00:43
wolfragepoolie: But I have not found a single complete GIT tool, so I guess I will just have to guess at it. and be CLI only.00:43
pooliewolfrage: i didn't think it was readonly00:44
pooliei think you do have to use 'dpush' rather than 'push', per http://doc.bazaar.canonical.com/migration/en/foreign/bzr-on-git-projects.html00:45
wolfragepoolie: http://doc.bazaar.canonical.com/plugins/en/git-plugin.html00:45
poolieah, i think think title might just be a bit out of date00:47
poolies//that title00:47
pooliethe project homepage says "All operations except for "push" are supported"00:47
wolfragehmmm ok, but with dpush I should be able to push the git repo to an online repository00:48
pooliewhat do you mean by online?00:48
wolfragegitorious account00:49
poolieyou want to push from a local git repo to a remote one?00:49
pooliewhat happens if you try just bzr push?00:49
wolfrageyes00:49
wolfragepoolie:  stby, it seems to have not error'd this time, one sec.00:51
RenatoSilvaanyone using bzr-hg can do a test to me?00:52
wolfragepoolie: bzr: ERROR: Unsupported protocol for url "git@gitorious.org:wolfrage-telepathy/otr.git"00:53
wolfragepoolie: Full out put:  Run command: bzr push git@gitorious.org:wolfrage-telepathy/otr.git00:53
wolfragebzr: ERROR: Unsupported protocol for url "git@gitorious.org:wolfrage-telepathy/otr.git"00:53
spivwolfrage: bzr-git uses URLs like git://...00:56
wolfragespiv: good catch that was for ssh00:57
spivOr git+ssh://00:58
wolfragehow would I have it do ssh on git, or is that not possible...00:58
wolfrageso this should work then? git+ssh://gitorious.org/wolfrage-telepathy/otr.git00:59
spivMaybe git+ssh://git@gitorious.org/wolfrage-telepathy/otr.git00:59
spiv(I'm not a bzr-git expert)00:59
wolfragespiv: k trying01:00
wolfragespiv: Thanks that worked!01:01
spivGreat :)01:01
wolfrageOK one more question and then I will leave you guys alone for a little while. How can I pull and merge the revisions that have occurred in this repository: http://git.collabora.co.uk/?p=telepathy-spec.git;a=summary and merge them back into mine. More... explanation on the way.01:05
wolfrageBasically the repository I have has not been updated for nearly 3 months. I want it up to date before I being to much work on it.01:06
wolfrageIs that asking too much?01:07
wolfrageThat would be a merge right?01:07
spivpull if the revision history hasn't diverged, merge if they have.01:08
spivi.e. pull is good for updating a mirror of another branch, merge is what you use when you have an independent branch and want to incorporate changes from another branch.01:09
wolfrageOK this one is independent and has been for almost a year, and last got a update three months ago01:09
wolfrageSo I should go with a merge.01:09
wolfragewhen I try to merge it fails with permission denied01:19
=== Ursinha-afk is now known as Ursinha
aj00200poolie: this is aj00200 with that Unicode bug. Thanks for all your help :)01:32
yhagerpoolie: the problem is that bzr tries to load the whole file into memory. This is a real blocker for our team to consider bzr.. :(02:06
RenatoSilvalet's say I create a branch from upstream release 1.0, then commit my patches, then merge upstream changes, then improve my patches etc. Is there any way to generate a patch for 1.0 release, that is, a diff of the changes since release 1.0 but ignoring all merges?02:10
fullermdNot in any remotely automatic way.02:12
RenatoSilvaI'm thinking on setting up two branches for that, one mypatch-r1.0 as main entry point for improving the patch, and other mypatch-dev from which I merge both upstream and mypatch-r1.0 changes02:12
fullermdYou could attempt it by a series of cherrypicks.  You could try finding (or building) a patch composition tool and doing the whole diff, then reverses of each merge (sorta the complement of the cherrypick method).02:13
fullermdMore flippant-cum-HHOS'ly, you could convert it into darcs and then commute the patches  ;)02:13
spivHHOS?  High Horse Of Silliness?02:14
fullermdWell, I was thinking Ha Ha Only Serious, but that works too   :p02:15
RenatoSilvacherrypicks? flippant-cum-HHOS? darcs?02:18
fullermdRenatoSilva: Well, it's a bit yflurgic, but as a TRX it's less nurrific than your average KSTRN-ish arglefarx.   :]02:20
RenatoSilvao.O, it seems easier just keeping the two branches02:20
fullermdVery probably.02:21
RenatoSilvaI just thought if I could do something like bzr diff -r 1.. --ignore-merges02:22
fullermdThat, no.  Trying to actually do it would be decidedly Not That Simple(tm).02:23
RenatoSilvaok thanks fullermd02:29
wolfrageWanted to stop back and thank you guys, now with a little bit of GIT on the command line I can run my repository with Bazaar, and do it smartly!02:55
poolieexcellent03:00
* spiv -> late lunch03:25
pooliemkanat: nice essay :)06:15
mkanatpoolie: Thanks!06:15
=== oubiwann-holiday is now known as oubiwann
=== oubiwann is now known as oubiwann-holiday
vilahi all07:37
jelmerg'morning Vincent07:38
vilajelmer: heya !07:38
vilajelmer: I submitted a mp for bzr-search fixing the failing tests07:39
jelmer\o/07:39
jelmervila: I submitted a MP for most bzr-xmloutput test failures (only one left) earlier07:39
vilajelmer: I digged the xmloutput a bit more... and it's even more obscure now, I ... huh ?07:39
vilajelmer: meh, there was only one failure when I started...07:39
vilalet me see your mp...07:40
jelmervila: the daily build is failing with 407:41
vilameh, I was pretty sure the custom escape_data was already fixed....07:41
vilamgz: escape_data xmloutput, can you refresh my memory ?07:42
jelmervila: it may not be an issue when the in-tree elementtree is used07:42
vilahmm, could it be py27 related ?07:42
vilajelmer: or is it that you're using 0.8.6 and I use trunk ?07:44
vilajelmer: qlog says: look at revno 14707:44
jelmervila: I'm using lp:bzr-xmloutput and indeed python 2.707:46
vilajelmer: bzr-xmloutput-0.8.6+bzr148~ppa112+113~natty1 should include it which means... meh wth07:46
vilajelmer: right, which should mean the bzrlib.xml_serializer logic needs one more fix for 2.7 ?07:48
vilajelmer: and your remaining failure is for test_info (which is the one I'm digging)07:49
jelmervila: the remaining failure for me is bzrlib.plugins.xmloutput.tests.test_info_xml.TestInfoXml.test_info_locking07:50
vilayup, a single test to test 8 combinations, I've got a parameterized version now with 2 failures and 3 errors07:51
jelmervila: also, more test failures in the natty bzr daily build :-/07:53
wolfrageI am using Bazaar Explorer with a GIT repo, and I am trying to push a commit to my remote branch, as an update. But I keep getting this:07:53
wolfrageRun command: bzr push07:53
vilabut at this point I need to talk to verterok as the intent of the xmlinfo command is unclear07:53
wolfrageerror: refusing to create funny ref 'None' remotely07:53
wolfragebzr: ERROR: None failed to update07:53
jelmervila: I see the timestamp error you mentioned earlier, but also: "AttributeError: 'InstrumentedTestResult' object has no attribute 'report_error'"07:54
vilajelmer: the later sounds like a testtools version mismatch07:54
pooliehi vila!07:55
vilapoolie: hello !07:55
jelmervila: Ahm, hmm07:55
jelmer'evening poolie07:55
vilajelmer: argh, you're using testtools trunk07:55
vilajelmer: did I complain yesterday about you *not* using trunk ?07:55
vila:D07:55
viladoomed if you do, doomed if you don't :D07:55
jelmervila: :-) I'm surprised it only breaks on natty though, not on Maverick07:56
jelmerwolfrage: hi07:56
jelmerwolfrage: "bzr push" won't work for git branches, you can only "bzr dpush" (though arguably the error message should be clearer)07:56
vilajelmer: It's a zen thing, testtools failures causes are of an infinite nature07:56
wolfragejelmer: Hi sorry about the interupt07:56
vilajelmer: that's because when you test, you want to always be prepared to accept new failures, zen thing...07:57
wolfragejelmer: ahh, I see. I got confident as it was able to push it as a new branch. But I guess updates will not. Since I am using Explorer, if i run the command "bzr dpush" do I need any other parameters?07:58
jelmerwolfrage: I'd be very surprised if it was able to push it as a new branch07:59
jelmerwolfrage: bzr dpush requires the URL to the branch to push to07:59
jelmervila: :)07:59
wolfragejelmer: I was surprised too, but poolie was talking to me at the time that it did it. | Ok I will give it a go with the url attached. Thank you.08:00
vilajelmer: the daily builds are a nice complement to babune, but we face a common issue here: the combinations and their related failures can be daunting at times08:02
wolfragejelmer: does the command need any dashes "bzr dpush --url" or just "bzr dpush url"08:03
jelmerwolfrage: just "bzr dpush <url>", much like you would use "bzr push"08:03
jelmervila: The intent isn't really to provide CI but rather to allow users to more easily follow current trunk, I'd rather catch these errors before we'd actually get to the package building stage.08:04
vilajelmer: hehe, but isn't that the intent of CI ? :D08:04
vilajelmer: don't get me wrong, I'm very happy about the daily builds, they address combinations that I can't address so far in babune (not do I really plan to address ;)08:06
vilas/not do/nor do/08:06
wolfragejelmer: did not work is it ok to post the error?08:06
jelmervila: Yeah, I guess that's also a form of QI :-)08:07
jelmerwolfrage: sure08:07
jelmervila: Errhm, CI08:07
* jelmer clearly has been watching too much QI lately08:07
wolfragejelmer: Run command: bzr dpush git+ssh://git@gitorious.org/wolfrage-telepathy/otr.git08:07
wolfragebzr: ERROR: <LocalGitBranch('file:///home/wolfrage/Programing/git/telepathy/otr/', 'HEAD')> and <RemoteGitBranch('git+ssh://git@gitorious.org/wolfrage-telepathy/otr.git', 'HEAD')> are in the same VCS, lossy push not necessary. Please use regular push.08:07
vilajelmer: :)08:07
* wolfrage thinks that is a good show.08:07
jelmerwolfrage: ah, you've got a git repository locally that you're pushing from, not a bzr branch?08:07
wolfragejelmer: Sorry thought I included that detail08:08
jelmerwolfrage: I figured you were pushing from a local bzr branch to a remote git branch, I didn't realise you had a git branch locally as well.08:08
wolfrageYes using bzr-git to push my local git to a remote git08:08
jelmervila: I'll chase down the testtools error. Do you have any idea about the timestamp?08:09
jelmerwolfrage: in that case "bzr push" is indeed the right thing to use, can you file a bug about the issue you saw?08:09
vilajelmer: not from the top of my head, pretty surprising08:09
vilajelmer: but I vaguely remember something like that happening in the past08:10
wolfragejelmer: sure. I was wondering should it be filled under bzr on launchpad or is there a bzr-git08:10
jelmerwolfrage: there's a separate bzr-git project08:10
wolfragejelmer: copy.08:11
wolfragejelmer: Bug #690547   https://bugs.launchpad.net/bzr-git/+bug/69054708:37
ubot5Ubuntu bug 690547 in Bazaar Git Plugin "GIT to GIT bzr push Fails "funny ref 'None' remotely"" [Undecided,New]08:37
ubot5Launchpad bug 690547 in Bazaar Git Plugin "GIT to GIT bzr push Fails "funny ref 'None' remotely"" [Undecided,New] https://launchpad.net/bugs/69054708:37
jelmerwolfrage: any chance you can add the relevant error log in ~/.bzr.log as well?08:39
jelmerwolfrage: the fix is probably that we should push to refs/heads/master, something that we're not explicitly doing at the moment08:40
wolfragejelmer: Working attachment.  Interesting, It somehow committed a delete of the branch. It is ok, but not sure how that happened. Or maybe Gitorious just screwed up. GIT makes my head hurt08:41
wolfragejelmer: Is it ok if I delete my email out of the logs.08:43
jelmerwolfrage: of course08:44
wolfragejelmer: As soon as it finishes what it is doing currently I will submit the log.08:45
wolfragejelmer: I wanted to know I see how to add files to a git with bzr but how do I remove them?08:49
jelmerwolfrage: it should be the same as regular bazaar08:52
jelmerwolfrage: please note though that bzr-git's main focus so far has been on interoperating with remote git repositories, the local support is still quite experimental - in particular as we can't really map the git index to anything in bzr08:53
wolfragejelmer: I know I am asking alot of the software, unfortunately all of the other GIT tools can not stack up to Bazaar Explorer, which is sad considering it was made for bzr not GIT. But it is helping me to contribute to the community because of it's versatility.08:55
wolfragejelmer: I do hope that you will not mind me making more bugs though as I find them. It seems that Add has no effect and Remove fails with permission denied which makes no sense as I own all of the files and directories.09:03
jelmerwolfrage: no, please do file more bugs09:05
jelmerwolfrage: please note though that these don't have a high priority for me at the moment, I'm mainly concentrating on the remote git repo use case09:06
jelmerwolfrage: patches are very much welcome though09:07
wolfragejelmer: OK I understand priorities. I just appreciate that the Software has helped me along this far. I really was not impressed by the other GIT tools.09:07
wolfragejelmer: LOL, After I get through with Telepathy, then I will come back over here. But I can only tackle so many bugs at once too. lol.09:08
wolfragejelmer: Log is attached, The error is at least a few operations back. But it was attempted multiple times.09:10
vilaspiv: changing signatures for branch creation broke looms :-/12:03
RenatoSilvaI have deleted the hg directory from plugins dir but it's still showing up in bzr plugins: hg 0.2.0dev in  C:\Program Files\Bazaar\plugins\hg.13:07
RenatoSilvaHow to purge it?13:07
RenatoSilvabzr hg-import is even running. How can that be? It's like bzr-hg is cached somehwere?!13:10
RenatoSilvac:\>ls   "C:\Program Files\Bazaar\plugins\hg" => __init__.pyo  commands.pyo  info.pyo  revspec.pyo13:18
RenatoSilvac:\>dir "C:\Program Files\Bazaar\plugins\hg" => not found o.O13:18
vilaRenatoSilva: 'bzr plugins -v' should tell you13:24
RenatoSilvavila: (11:07:02) RenatoSilva: [...] but it's still showing up in bzr plugins: hg 0.2.0dev in  C:\Program Files\Bazaar\plugins\hg.13:32
RenatoSilvavila: where I got that path with -v13:33
RenatoSilvavila: seems a crazy windows 7 bug, I just rm -r'ed  it13:33
vilaRenatoSilva: then it's probably windows specific and the plugin may be in bzrlib.zip13:34
vilaRenatoSilva: see if you can reinstall bzr without the plugin13:34
RenatoSilvavila: I removed it with rm -r13:34
RenatoSilvavila: bzr-hg now disappeared13:35
vilaRenatoSilva: *I* understand and trust you, yet, bzr plugins -v seems to disagree with you13:35
RenatoSilvavila: it was like the hg dir was still existing in the filesystem "partially". For explorer and dir, it didn't exist, but for bzr and ls and rm it did13:36
vilaRenatoSilva: try a reboot first to exclude nasty caches (doubtless)13:36
jelmersomebody else ran into similar problems13:36
vilameh, why do I say doubtless when I doubt...13:36
vilayup, as jelmer says, this rings a bell13:36
RenatoSilvavila: I removed hg dir yesterday, and turned pc on today, and the issue was there13:37
vilawowwwww13:37
jelmerI'm not sure if it was windows 7 as well, but it seems like the GUI doesn't always display the actual contents13:37
RenatoSilvavila: not sure if it's clear but after rm -r, bzr plugins doesn't list bzr-hg anymore13:37
* vila blinks13:38
jelmerRenatoSilva: what do you mean with rm -r though?13:38
vilaRenatoSilva: no, it's not clear13:39
RenatoSilvajelmer: I thought about that, but I could create the hg dir in explorer!13:39
RenatoSilvajelmer: at the same time hg was already there (for some tools)13:39
RenatoSilvalet me explain again form beginning. I removed bzr-hg yesterday by deleting C:\Program Files\Bazaar\plugins\hg. Today I turned computer on and noted that it was still there in bzr plugins. The -v options was showing that exact path. I went to explorer, and it wasn't there. I went to win32 terminal, and dir command couldn't find it.13:42
RenatoSilvaBut ls.exe could (I have MSYS)! And so rm.exe. Weirdly, I could create the hg dir again in explorer, even with it already existing for ls and bzr13:44
RenatoSilvaSo I just tried rm -r /c/Program Files/Bazaar/plugins/hg, and it worked, bzr plugins stopped showing bzr-hg in the list13:45
RenatoSilva* the -v option13:46
=== zyga is now known as zyga-food
=== Ursinha is now known as Ursinha-lunch
=== Ursinha-lunch is now known as Ursinha
awilkinsIs there a gitstats for Bazaar? If (e.g.) gitstats worked internally on git-fast-export format (don't know if it does), it would work for anything that had a fast-export frontend, no?15:45
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
=== tremolux_ is now known as tremolux
mgzvila/jelmer: yes, that xmloutput thing was fixed on both trunks16:10
mgzI'm not sure what the failures were from16:10
mgzbut looking at <https://code.launchpad.net/~jelmer/bzr-xmloutput/fix-tests/+merge/43738> I'm a little concerned16:10
vilamgz: including python 2.7 ?16:11
vilamgz: by the way, I nailed the last failures on osx 10.6 only to be bitten by a new one ;)16:11
mgzjust seen that as well and will review.16:11
jelmermgz: I still get them on trunk:16:11
jelmerTypeError: _escape_cdata() takes exactly 2 arguments (1 given)16:12
vilamgz: patch awaiting review... too fast :)16:12
mgzanyway, not using a function from bzrlib.xmlserialiser would be fine16:12
mgzbut the one you've written in does less than the etree one, which was already insufficient16:12
jelmermgz: the only difference with the etree one is that it doesn't take an encoding argument16:13
mgzright, so... passing non-ascii either unicode or bytes becomes risky.16:13
mgzit's a bad interface which doesn't help, but it's even easier to use incorrectly now.16:14
jelmermgz: we weren't passing an encoding before either16:14
jelmermgz: so that situation doesn't really change16:14
mgzno, but the etree 1.3 function defended against bad bytestrings16:14
mgzalso, string.replace jelmer? how retro are we? :)16:14
jelmermgz: I just took whatever etree was using :-) I guess that can be text.replace now, indeed...16:15
mgzthe problem in the first place was etree changed this function, which python 2.7 picked up.16:15
mgzI'd like to just make xmloutput less retarded about xml generation, but that's a big job.16:16
mgzanyway, I'll look into why you were getting failures, I thought I'd checked different version combinations16:17
mgzwasn't helped by most of the bzr-xmloutput test suite failing here.16:18
jelmermgz: FWIW I don't think we can use the stock _escape_cdata since it always encodes in python 2.716:19
mgzwell, it's a question of which misuse we want to break16:19
mgzmost of xmloutput happens to work because the data is ascii, it's not hard to break it.16:20
jelmermgz: there are more than a few places where the text passed into _escape_cdata is unicode, and the caller expects it to come back as unicode too16:20
mgzokay, yep, this is a problem.16:22
mgzwill put review in that mp.16:24
=== beuno is now known as beuno-lunch
RenatoSilvamgz: what do you mean with xmloutput less retarded about xml generation?16:36
mgzit's doing the print statement and string interpolation approach16:38
RenatoSilvaI think I've found a bug: http://pastie.org/1379843, that error pops up on a gui dialog and then qlog list commits without the messages16:39
mgzthis can work if you're an expert about what the xml spec says, but anyone normal just gets it wrong in all kinds of edge cases.16:39
mgzvila: jam's reviewed your mp already, so I don't need to :)16:39
vilamgz: indeed :)16:39
vilajam: thanks and hi !16:39
RenatoSilvamgz: I dealed with some xmloutput weaknesses some time ago, and some of them still exist16:40
RenatoSilvamgz: I contributed some patches for encoding fixes, but work is still needed16:41
mgzexample of some wrongness:16:41
mgzexcept Exception, e:16:41
mgz    xml += '<error><message>%s</message></error>' % \16:41
mgz        _escape_cdata(str(e))16:41
RenatoSilvamgz: for example, bzr xmlstatus is putting cp1252 in the preamble, which is W3C invalid iirc16:41
mgzwhat happens if the exception instance stringifies to non-ascii?16:42
RenatoSilvawell for sure, cp1252 is not a proper encoding16:42
mgzthat depends on in iana.16:42
mgzsome of the cp* encodings are listed, some (like cp932, which would actually be useful) aren't.16:42
mgz*on the iana.16:43
mgzhttp://www.iana.org/assignments/character-sets <- allows "windows-1252"16:43
mgzthey should just add the "cp" prefix as an alias to all windows numbered encodings they list there16:45
mgzinstead of it being pot-luck.16:45
mgzanyway, there's an easy fix xmloutput could use16:46
mgzthe output-based-on-terminal-encoding is just daft.16:46
mgzshould instead either do utf-8 with no prologue, iff the terminal is utf-8, or ascii with &#...; escaping.16:47
mgzbut that means touching all the output code, which I don't want to do without actually making it robust.16:47
awilkinsSome things don't even like UTF-8 AFAIK. The MS libraries had a bug where they would emit ¬ characters happily enough and then drop dead trying to parse their own output.16:48
RenatoSilvaxml needs prologue16:49
RenatoSilvaI mean, if you have a chance to tell what encoding it is, why not say? tools reading that output will need to guess it's utf-8 if you don't declare it16:50
mgznope, it's speced very clearly.16:50
mgzwithout prologue, it depends on the bom, without bom it's utf-816:50
RenatoSilvamgz: what you're saying is addressed in bug 39494316:50
ubot5Launchpad bug 394943 in bzr-xmloutput "Declared and actual XML encoding should match, and the encoding should be XML valid" [High,Confirmed] https://launchpad.net/bugs/39494316:50
mgzthus, if you want a utf-8 xml document, ommitting the prologue is fine.16:51
awilkinsIndeed. Many things just use the platform encoding by default (esp Java which assumes that all InputStream is the JVM encoding - which is cp1252 (or whatever the equivalent is) on Windows16:51
RenatoSilvamgz: without bom it's utf-8? how can you guess that? you know because you make bzr-xmloutput do it, but apps doesn't have a way to know it16:51
RenatoSilva"without prologue, it depends on the bom, without bom it's utf-8", do you mean this is the XML spec? iirc it doesn't even allow you to remove the prologue16:52
awilkinsBOMs are a PITA anyway ; so many tools don't handle them right, so many XML output encoders don't write one (although some do).16:54
RenatoSilvahttp://www.w3.org/TR/2008/REC-xml-20081126/#dt-xmldecl16:55
mgznote that's not a MUST.16:56
awilkinsA SHOULD requirement is probably something you ... should .. make the effort to implement. The BOM thing is a MAY for UTF-8 ; and I'd prefer to see it left off because it will break casual compatibility with many tools if left in.16:56
RenatoSilvaawilkins: why would xml generators choose BOM over preamble, specially when BOMs are a PITA, and W3C obligates you to write a preamble? :P16:56
awilkinsRenatoSilva, Oh, quite - I'd rather not see BOM, and I'd prefer a preamble.16:57
RenatoSilvadoes it stand must != should? I didn't know that16:57
RenatoSilvabecause in dictionary, you must do it is the same as you should do it afaik16:58
mgzyes, and given the way things have developed, even SHOULD is a little strong.16:58
awilkinsIf you neglect a MUST you've not met the standard - missing a SHOULD will attract "tch, tch" and frowns but not get you labelled non-compliant.16:59
awilkinsAnd a MAY is a nice-to-have.16:59
mgzsee 4.3.3 as well, which has some encoding specific directives.17:00
awilkinsAFAIK cp1252 is the same as ISO_8859_117:00
mgzanyway, for this plugin none of this should matter regardless of the terminal encoding17:00
mgzawilkins: nope, it swaps out the C1 control characters for some extra glyphs17:01
awilkinsGah, MS at their finest.17:01
mgz^shouldn't matter, because unlike rio which causes issues here, xml *does* have a proper escpaing mechanism if the encoding can't represent a character17:02
RenatoSilvaafaik cp1252 is a superset of latin117:02
RenatoSilvamgz: see comments 15-18 in bug 39494317:03
ubot5Launchpad bug 394943 in bzr-xmloutput "Declared and actual XML encoding should match, and the encoding should be XML valid" [High,Confirmed] https://launchpad.net/bugs/39494317:03
mgznot printing mojibake is always worth while.17:05
mgzit's only hard to fix because the code is a mess, particularly over what's unicode, what are bytestrings, and so on.17:05
RenatoSilvaanyway, does the xml spec stand that if an xml misses encoding declaration, you can use boms to inform the encoding, and does it say if there's no bom you shall read it as utf-8???? this sounds weird17:06
mgzyes, see 4.3.317:07
RenatoSilvamgz: yeah that bug is hard to fix because the whole code needs to be checked17:07
mgzit's worded at little backwards, but:17:07
mgz"...it is a fatal error for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration, or for an entity which begins with neither a Byte Order Mark nor an encoding declaration to use an encoding other than UTF-8."17:07
mgzis there something more general as well...17:08
RenatoSilvamgz: "In the absence of external character encoding information (such as MIME headers), parsed entities which are stored in an encoding other than UTF-8 or UTF-16 MUST begin with a text declaration"17:11
mgzright, "other than"17:11
mgzso, utf encodings don't need it.17:11
RenatoSilvamgz: imho this is pretty much a fallback is case there's no way to know what encoding it is than it's stimulating you to not use the xml preamble. As the doc says, you must not, but you should, use preambles. Unless you have a specific good reason for not using:17:13
RenatoSilvamgz: "SHOULD This word, or the adjective "RECOMMENDED", mean that there    may exist valid reasons in particular circumstances to ignore a    particular item, but the full implications must be understood and    carefully weighed before choosing a different course. "17:13
mgzright, and that was reasonable advice.17:14
mgzbut in the years since the spec was written, no other version of xml has gained traction, and utf-8 is increasingly the default encoding everywhere.17:14
mgzso it's less important than it was to state the bleeding obvious.17:15
RenatoSilvawell anyway, I'd recommend not removing the preamble, it doesn't hurt anyway. And I disagree, as I think you disagree too, with bzr-xmloutput trying to guess the output encoding to use. It should use a single static encoding, preferably utf8.17:16
mgzI'm not quite saying that.17:16
mgzThere's no reason to print utf-8 to a non-utf-8 terminal, so it should just not do that.17:16
mgzwhich is trivial.17:17
RenatoSilvaI don't get you17:17
RenatoSilvabzr-xmloutput is not supposed to be used in a terminal17:17
mgzthe annotated xml spec is informative on the thinking at the time.17:18
RenatoSilva?17:18
mgzhttp://www.xml.com/axml/notes/Enc1.html "Very little of the world's text is stored in Unicode encodings"17:18
mgzhttp://www.xml.com/axml/notes/ASCII.html "As the spec says, pure ASCII files are UTF-8 as they sit, and thus don't require an encoding declaration. The problem is that a lot of ASCII files are not quite pure."17:19
mgz^ it's not intended to be, but these things do get used on the terminal, where's that version-info bug...17:19
mgzand as it's trivial to avoid printing junk to a terminal, it should.17:20
RenatoSilvawhy would one use bzr-xmloutput in terminal? examples?17:21
PengSpent too much time working on web apps and can't read plain text anymore? :P17:23
mgzsee bug 51860917:23
RenatoSilvamgz: I personally don't like the idea of converting non-ascii to XML char entities17:23
ubot5Launchpad bug 518609 in Bazaar "Unicode exception occurs by "version-info"" [Medium,Fix released] https://launchpad.net/bugs/51860917:23
mgzthere's no reason to use that command rather than one that works, but we got three bugs filed about it.17:24
mgzRenato, I think you're overestimating how hard it is to conditionally escape characters if a terminal is detected.17:25
mgzit's like, three lines of code in a well constructed program.17:25
vilamgz: for values of 'well' known long after the program has been written :-P17:26
vilamgz: not that I disagree ;-)17:26
RenatoSilvamgz: how about version-info, what does it have to do with xmloutput?17:28
mgzit's an internal-use command with escaping issues.17:28
RenatoSilvamgz: sorry, and how does this take you to "I must now use xmloutut"?17:29
RenatoSilvamgz: do you mean xmloutput has an xml version for that command and it does work?17:30
mgzno, I'm just pointing out that it's easier to write a command correctly than assume people won't try and break it.17:30
mgzanyway, I now need to go and clean the house before I get yelled at.17:32
RenatoSilvaok, but back to the question, why one would use bzr-xmloutput in terminal? it's not supposed to be used there. If you want to use it, then use a terminal with utf8 support. That won't be a problem for Linux users, not even for Windows users, they can chcp 650001 before command call.17:33
vilamgz: nah, nobody will yell at you for cleaning xmloutput :)17:33
RenatoSilvaSo I really see no reason for xmloutput caring about terminal encoding. It should use a static utf8 encoding, that will make the actual use of xmloutut a lot easier (in bzr-java-lib, bzr-eclipse etc)17:34
mgzI think you think I'm suggesting something I'm not.17:36
=== beuno-lunch is now known as beuno
vila:)17:36
RenatoSilvawhat's funny about xmloutput at the moment is that it's more crazy than before, because it mostly used to declare utf-8 and write something else, but now it gets some system default encoding and writes based on the terminal encoding, or something like that (for example win32 console is cp850, and so it is xml output, but declared as cp1252)17:40
RenatoSilva(continuing the example, but if I use mintty, which is not a proper win32 console, it writes latin1 bytes)17:41
mgzI am getting yelled at.17:47
mgzlook, all it needs is something like:17:47
mgzoutput = sys.stdout17:47
mgzif getattr(output, "encoding", None) != "utf-8":17:47
mgz    output = codecs.lookup("ascii")[3](output, "xmlescape")17:47
mgzand a proper method of writing xml rather than the current mess.17:48
mgz(which is the hard bit)17:48
mgzwriting that is easier than saying Don't Do That whenever someone accidentally uses an xml command on a non-utf terminal, and proper parsers are perfectly capable of handling numeric entities17:50
RenatoSilvaI don't like escaping chars to xml entities17:50
RenatoSilvaI'd rather go with just printing the actual char17:51
jelmerRenatoSilva: that may not be possible17:51
RenatoSilvajelmer: why not?17:51
mgzyou prefer UnicodeEncodeError bug reports?17:51
mgzthis sounds like a pretty irrational fear, and not one you'd ever actually encouter17:52
RenatoSilvamgz: iirc there's a way to print bytes to stdout, without encoding mess17:52
mgzeither, as you say, no one ever prints this to a terminal, in which case you never see it17:52
RenatoSilvamgz: in a way that you delegate the encoding mess to the terminal or what reads stdout17:52
mgzor someone does try that, and you want bzr to break rather than show them something understandable.17:52
jelmerRenatoSilva: the characters might be utf8 while the terminal is iso8859-9, so some characters would not be printable.17:53
mgzanyway, this is trivia, and really didn't need this much discussion.17:54
RenatoSilvajelmer: there's no terminal, bzr xml-output is not to be used in a terminal17:54
mgzwhat we've been talking about for half an hour has nothing to do with the actual bug that exists, or what needs to be done to fix it.17:54
RenatoSilvajelmer: even if so, then the user just changes terminal's encoding before running xmloutput17:54
mgzso I'm really going/17:54
jelmerRenatoSilva: So the user has to be told to change their encoding (which might be nontrivial)17:55
RenatoSilvamgz: I don't like your idea of entities that's why I'm discussing. I suspect it would break bzr-java-lib and bzr-eclipse more than they already are17:55
jelmerRenatoSilva: I don't see what is problematic about entities.17:56
jelmerRenatoSilva: Then we should fix them, don't they use standard XML parsing libraires?17:56
RenatoSilvajelmer: ok xml parsers should be ok with that, but not sure if bzr-java-lib and bzr-eclipse will be ok. Kind of a feeling from having writing some patches to them17:57
RenatoSilvajelmer: I'm not sure on the exact purpose of entities but why allow non-ascii in XML then? I mean, why not make XML standard ascii-only with using char entities for specifying non-ascii?17:59
jelmerRenatoSilva: If they don't use standard XML parsing libraries then I suspect we have worse things to worry about.17:59
RenatoSilvajelmer: I wouldn't be surprised if they don't, that's what I mean :)18:00
jelmerRenatoSilva: That's possible but can use significantly more disk space for some languages if e.g. the document is stored as UTF16.18:00
RenatoSilvajelmer: so it's an alternative for when there's a reason for using them18:02
jelmerRenatoSilva: and I think this is a perfectly valid situation to use them18:03
RenatoSilvajelmer: for example you need to send the xml somewhere but before it gets there something reads it and tries to decode it as it was ascii-only, raising errors. So you use entities as workaround for the xml passing fine over it and getting fine in the destination18:04
RenatoSilvajelmer: well I don't think making things pretty to crazy users reading xml output in terminal rather than using the regular bzr commands is a good reason, it's just that what I think.18:05
jelmerRenatoSilva: I don't think it's a very big deal, but it does mean we get to avoid a bunch of encoding-related issues.  And I haven't heard any disadvantages of using entities yet.18:06
* maxb skims scrollback and asks: Use entities for which characters, precisely?18:11
jelmermaxb: characters that can't be represented using current terminal's encoding18:13
maxbThat seems sane, just so long as the current encoding in the absence of a terminal being involved isn't affected by the system's terminal encoding18:14
RenatoSilvamaxb: but the command in question is not supposed to be used in terminal, so why care so much about crazy users doing it?18:15
maxbRenatoSilva: because it's a hopefully simple way to do something reasonable in a terminal. Doing something reasonable rather than erroring outright is better.18:16
RenatoSilvamaxb: as I said iirc there's a way to send raw bytes to stdout in python, so no exception would be raised. The only issue would be junk in terminal, but who cares? The user should not be doing that anyway. Besides, it's easy to fix, because Linux terminals support utf8, and in windows it's just chcp6500118:18
maxbRenatoSilva: Your proposal would be acceptable behaviour, IMO, but if we can do better with little effort, why not do so?18:19
RenatoSilvamaxb: the issues I have seen with bzr-xmloutput, bzr-java-lib and bzr-eclipse, were related to doing things wrong, not simply by the pure fact of not having chars represented as entities18:19
maxbOOI, what is the way to send raw bytes to stdout?18:19
maxbRenatoSilva: "Let's emit XML that is compatible with the terminal encoding" is not incompatible with "Let's do things right". You seem to be suggesting otherwise.18:21
* jelmer -> foods18:22
RenatoSilvamaxb: "Let's emit XML that is compatible with the terminal encoding"18:24
RenatoSilvamaxb: that's valid for commands supposed to be run in terminal, not bzr-xmloutput. Besides, I see it from the opposite perspective, like the natural, and hence good way is having the actual bytes, then I start to think of the advantages of converting to entities, and I see no reason for that, in the specific case of xmloutput :)18:26
maxbYour goal is to get valid data out for programmatic use. Other people may also have the goal of XML that is valid if copy/pasted from a terminal. The two goals are not incompatible18:29
RenatoSilvamaxb: convert actual bytes to entities, then converting them back to the same actual bytes. I just think this is useless overhead (ok it's useful for displaying in terminal, but still useless, because terminals are not for xmloutput)18:29
maxbThere is no useless overhead, because if you're writing to a pipe to another program, you'd be operating in UTF-8, and the only entities you'd be using are the five basic ones to escape characters that have meaning in XML itself18:31
RenatoSilvaI may have the goal of xmloutput making some coffee, but that doesn't mean it makes sense so that developers should work on it :P18:31
jelmerRenatoSilva: if converting encoding and decoding special characters to entities has an overhead that's in any way noticable overhead then you're transmitting way too much data with XML anyway.18:36
maxbAnyone know a good document about the guts of python's stdout encoding handling I could read?18:37
RenatoSilvajelmer: I'm not sure if I understood correctly, but the idea is convert every non-ascii char into a xml char entity, right? So that the data is ascii-only, right? Well imagine you use bzr-eclipse to fetch the commit logs on a sufficiently big branch, it may become slow enough for being annoying.18:41
maxbRenatoSilva: no, only convert characters not representable in the target encoding18:44
jelmerRenatoSilva: Other things will hit you much much worse.18:44
RenatoSilvajelmer: I just had an insight, why discuss this so much, xmloutput could just have an argument for that :D like --use-entities or --use-actual-bytes :)18:44
jelmerRenatoSilva: the character conversion won't have any noticable impact18:44
maxbew. NO>18:44
jelmermaxb: what are you saying no to ? :-)18:45
maxbPointless options are fail, both for understandability and maintainability18:45
RenatoSilvamaxb: ah ok so it's using entities only for unrecognized byte sequences? ok, but converting to entity doesn't really fix the problem, it just changes from python unicode exceptions from some more high level error in the application which will be fed with such crazy data18:48
RenatoSilvamaxb: not that I disagree with that, but just noting18:49
jelmerRenatoSilva: The application is very likely able to deal with unicode18:50
RenatoSilvamaxb: the proper fix is to find out why the xml is getting invalid chars inside it18:50
jelmerRenatoSilva: that's the point, the XML isn't getting invalid characters in it18:52
jelmerit's just getting characters that can't be encoded for the current terminal.18:52
RenatoSilvajelmer: but how about the invalid chars which were changed into entities. I'm not sure if parsers will convert those invalid-char entities back to the actual bytes, or will leave it out for who's reading, but either way, the application will get invalid input. Either with the data containing entities or the actual invalid bytes, the app will crash on processing it.18:53
RenatoSilvajelmer: ah ok, so the problem is parsing errors due to the actual bytes, I see18:54
jelmerRenatoSilva: which invalid characters are you talking about?18:54
RenatoSilvajelmer: (16:44:04) maxb: RenatoSilva: no, only convert characters not representable in the target encoding18:54
jelmerRenatoSilva: right, those are unprintable targets.. they're not invalid in any way18:55
jelmerand they're only unprintable in the context of the terminal18:55
* RenatoSilva confused18:55
* jelmer really goes to get some food now18:59
RenatoSilvaI think I understand a bit better now19:01
RenatoSilvabut I agree only if it's for terminal19:04
RenatoSilvain mgz's example,  if getattr(output, "encoding", None) != "utf-8": output = codecs.lookup("ascii")[3](output, "xmlescape")19:08
RenatoSilvawhat if it's None, how will output behave, since there's no target encoding to check compatibility to19:08
mgz...how is this conversation still going on?19:08
lifelesswhat if what is None ?19:09
mgzRenatoSilva: could make no encoding attribute do plain utf-8, it doesn't really matter.19:09
mgzwould just involve changing the test and an else clause.19:10
RenatoSilvalifeless: the encoding returned by getattr(output, "encoding", None). Since there's no target encoding (it's None), I wonder how entities will be handled in that example, will they be generated for every non-ascii char or for no char at all?19:12
RenatoSilvalifeless: specially, it's None when redirecting to files, or using pipes I suppose, so I wonder what will be the behavior. Because if it's a pipe or file, there isn't really sense, imho, in generating the entities. But for terminals, ok, it doesn't hurt.19:15
smoserso on fresh lucid install:19:17
smoser$ bzr branch lp:qa-regression-testing19:17
smoserYou have not informed bzr of your Launchpad ID, and you must do this to19:17
smoserwrite to Launchpad or access private data.  See "bzr help launchpad-login".19:17
smoserbzr: ERROR: [Errno 4] Interrupted system call19:17
smoseri see evidence that this is fixed in 2.1.2.19:17
lifelessRenatoSilva: if its not, it will encode to an ascii encoding with xml escaping, no ?19:19
smoserevidence at http://doc.bazaar.canonical.com/development/en/release-notes/bzr-2.1.2.html . is there an explicit bug that i should ask be made available in -updates ?19:19
RenatoSilvalifeless: not sure if you followed but I was talking about mgz's example:  if getattr(output, "encoding", None) != "utf-8": output = codecs.lookup("ascii")[3](output, "xmlescape")19:22
RenatoSilvalifeless: if it's not == if stdout is not a pipe/file?19:23
RenatoSilvahow got another crazy error with bzr qlog in bzr-eclipse19:23
RenatoSilvalooks like new versions of bzr have compatibility problems with old branches19:24
RenatoSilvas/how/wow19:24
mgzthere's no need to get hung up on that example, as an exercise feel free to write your own version.19:26
mgzbut this discussion ceased to be useful about... well, I'm not sure it was ever useful.19:26
mgzcorner case behaviour with encoding attributes is not what's breaking things for you, nor is anything else we've talked about.19:27
RenatoSilvamgz: ok I just mean that would be interesting for non-utf8 terminals *only*, so it would need a way to check if stdout is a terminal, something like posix's isatty19:27
mgzas I said, feel free to write your own example.19:28
RenatoSilvaok19:28
mgzit's not actually making progress on fixing the bugs here, but whatever.19:28
RenatoSilvaheh true19:29
lifelessmgz: hi19:33
lifelessmgz: can you reproduce jams testtools failures?19:34
mgzlifeless: no. see the log from the other day.19:38
mgzand he's not been on at the same time as me since so haven't been able to bug him further about it.19:38
mgzah, I see he said 2.6.4 at three that morning, I could try backing up my build to that minor version.19:40
wolfrageSo I have a small problem. I used Bazaar Log and reverted my Git Repo to an earlier revision, just one. But GIT on the command line still shows fine. But Bazaar explorer shows like there are uncommited files.19:40
wolfrageHow do I get Bazaar Ecplorer to see that there are no changes to be made.19:41
maxbThe meaning of "bzr revert" is quite different from "git revert"19:44
wolfrageok How do i tell bzr to go back to where it was19:45
wolfrageeven if i choose update, it says that it is up to date, but yet it differs from working branch19:49
wolfrageSo did i change the branch some how19:49
lifelesswolfrage: if bzr diff shows changes, then the tip commit refers to different content than is in your working tree20:04
lifelesswolfrage: I don't understand how git is related to your question though20:05
wolfragelifeless: it is a local git repository. I am using bazaar to work on it, because it seems to work great as compared to the other tools20:06
wolfrageI used Bazaar to work through a rebase in git, and it helped alot.20:06
wolfragelifeless: But now I did this revert and Bazaar shows the working tree is different. I just want all of the error messages to go away so i can continue to use it on this GIT repo agian. i will not play around with it agian like that once I do20:07
wolfragelifeless: So how do I move the tip back to the working tree20:09
lifelesswhat was the revert you did, in git?20:09
lifelessjelmer, the author of bzr-git would be a great person to ask about this (you are using bzr-git?) but hes not around right now20:10
wolfragewell I did it in Bazaar explorer, GIT still shows same status. In Bazaar I was in the log and told it to revert to the revision just before the last.20:11
wolfragelifeless: I was talking to jelmer earlier about a seperate issue, he is very helpful, and yes I am using bzr-git20:11
lifelessok, so in bzr-explorer you said 'revert'20:18
lifelesswhat that does is changes the working tree *only*20:18
wolfragelifeless: yes20:18
lifelessif you reverted to a particular revision using bzr-explorer20:19
lifelessto under it, just do 'revert' without a particular revision, again using bzr explorer20:19
wolfragelifeless: OK. I appreciate you taking the time to explian it to me also.20:19
lifelessthis will force all your files to be the same as tip.20:19
lifelessthen, if you want to rollback the branch to a particular revision, you can use uncommit, or pull20:20
=== Ursinha is now known as Ursinha-brb
RenatoSilvais it normal to revolve functional merge conflicts on a following commit, not in the merge commit?20:21
RenatoSilvaI think this helps clarifying things20:21
RenatoSilvathe merge I did fixed a problem, but my patch made it come back again, so it's a merge issue. I'm thinking of uncommitting  the merge (it's the last commit) and applying it there, or just commit a new change referring to the merge in comment20:24
wolfragelifeless: It did not work, it says no revisions to be pulled and for the revert it just runs with no error, but Bazaar remains the same after a refresh.20:25
wolfragelifeless: What if i deleted the bzr folder20:25
RenatoSilvait didn't exactly made it come back again, but sort of20:25
wolfragelifeless: in the git repo, would that revert it?20:26
wolfragelifeless: I take it back there is a bzr folder with in .git, but it is just file lock.20:27
RenatoSilvabtw, is there any way to see only the merge changes? That is, when you click over the merge in bzr qlog, you see changes made by the merged branch and changes made due to the merge itself. I'd like to see only the latter20:28
lifelessRenatoSilva: yes, the difftastic plugin20:29
lifelesswolfrage: sorry, I'm not sure whats going on there20:29
lifeless'revert' with no revision + bzr diff should always show nothing20:29
lifelessif its not, its a bzr-git interaction - could you file a bug on bzr-git?20:29
RenatoSilvalifeless: difftastic? ok thanks20:30
RenatoSilvalifeless: btw do you know how is bzr-hg, iirc you were the maintainer? I need it but it doesn't work, tried last from trunk too20:32
lifelessjelmer is looking after i tnow20:36
wolfragelifeless: seems to be more of minor error. I will try the series of commands agian.20:41
wolfragethen i will just keep on, as it seems to not effect anything20:41
wolfrageIs there an easy way to convert to an from GIT - BZR? and will it maintain compatability when it goes back to GIT?20:42
lifelesswolfrage: bzr branch git://... destinationpath; read the bzr-git documentation20:45
lifelessplease file a bug - something went wrong, we should fix it20:45
wolfragelifeless: I am not sure if i could even reproduce it. This branch is volitile. It just got rebased twice and has been updated from almost 13 months of inactivity20:50
lifelessknowing that there was a problem is often most of the battle in fixing it :)20:51
wolfragelifeless: I filled a bug on an issue earlier, and I will be hanging around here, so any errors I can reproduce I will be sure to file agianst.20:51
radixwhat's that configuration parser library that bzr uses?20:51
lifelessconfigobj ?20:52
radixyeah, probably20:52
wolfragelifeless: OK I will file. I like Bazaar as a tool, lets me program and not get stuck on the command line trying to figure out Version Control Systems...20:52
lifelessthanks!20:53
=== jelmer is now known as Guest28766
=== Guest28766 is now known as jelmer-n900
pooliejam, spiv, jelmer, udd meeting is now21:03
RenatoSilvahow do I specify the submit branch so that bzr diff -rsubmit: will use the right branch?21:09
RenatoSilvahmm a useless merge, nevermind21:10
jelmer-n900renatosilva: you can edit .bzr/branch/branch.conf or perhaps use bzr config21:10
mwhudsonyeah, merge --remember will do that21:11
jelmer-n900hey mwhudson21:12
mwhudsonjelmer-n900: hello21:12
=== Ursinha-brb is now known as Ursinha
spivpoolie: I think https://code.launchpad.net/~mbp/bzr/687653-notbrancherror/+merge/43314 probably ought to be marked rejected (for 2.2 at least)23:14
pooliei agree23:15
=== oubiwann-holiday is now known as oubiwann

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