/srv/irclogs.ubuntu.com/2012/09/05/#bzr.txt

glyphHiya. We've got a buildbot which is using bzr, while our main repository is still SVN.  The buildbot wants to build svn revisions.  svn:revno almost does what we want, except it demands a level of precision we can't necessarily provide:01:10
glyphTo wit, when we have a revision number that is in a branch, but we try to check it out on trunk, we don't get the "highest without going over" behavior that "svn checkout" would produce.01:10
glyphIs there a way to get that behavior without lots of hacking of 'bzr log' and its output?01:11
lifelesspossibly01:14
lifelessuhm01:14
lifelessbefore:svn:xxx01:14
lifelessor after:svn:xxx01:14
lifelessor you could write a plugin for svn-approx:xxxx01:15
lifelesswhich would do whatever you need01:15
lifelessrevision resolving plugins are pretty simple01:15
glyphlifeless: interesting01:16
glyphlifeless: that doesn't seem to work though.01:17
glyphbzr: ERROR: Unsupported protocol for url "after:svn:34810"01:17
lifelessafter might be science fiction01:20
lifelessI suspect you need a small resolver01:20
lifelessbzr help revisionspec will give you the current ones01:21
lifelessyou can look at e.g. bzr-svn to see how svn: is implemented and registered01:21
glyphlifeless: OK.  Probably don't need it, but that's good to keep in mind.  I did write a bunch of shortcut plugins for my own personal use :)01:23
glyphno revision plugins though.01:23
spivrevspec plugins are pretty straightforward.01:28
lifelessglyph: I suspect a plugin is what you need, that or a patch to the svn revspec to be fuzzy01:28
tomprincebzr: ERROR: Requested revision: u'svn:35497' does not exist in branch: BzrBranch7('http://svn.twistedmatrix.com/bzr/Twisted/trunk/')04:11
tomprince^--- does this indicate an out-of-date version bzr/bzr-svn?04:12
=== _thumper_ is now known as thumper
spivtomprince: is the bzr-svn plugin loaded?  (does it appear in 'bzr plugins' ?)|04:28
spivOr possibly it means that bzr mirror of the svn trunk is out of date?04:28
tomprinceI don't have access to the host. It could be that the bzr-svn plugin is loaded.04:44
tomprincehttp://buildbot.twistedmatrix.com/builders/rhel6-32bit-py2.6/builds/984/steps/bzr/logs/stdio04:45
tomprincespiv: ^--- is the output I get.04:45
tomprinceI'm trying to diagnose the problem remotely, so I can provide instructions to the person who has access to the machine.04:47
spivI guess ideally the 'bzr' step of that buildslave config would capture the .bzr.log and put it somewhere visible.04:57
spivOr perhaps run bzr with -Derror or something04:57
spivWell, 'bzr log -r-1 -v --long --show-ids http://svn.twistedmatrix.com/bzr/Twisted/trunk/' shows its currently at svn's r3549905:01
spivSo that error does suggest that there's something wrong with bzr-svn on that slave.05:02
mgzmorning08:07
jelmerpom08:51
jelmertomprince: hi08:55
jelmertomprince: did that revision touch that particular branch?08:55
jml*awesome*11:10
jml$ bzr di11:10
jml=== modified file 'sourcedeps.conf'11:10
jmlbzr: ERROR: Could not understand response from smart server: ['x\x9c\xa5\x92\xcb\x0e\x820\x10E\xd7\xf2\x15\xee\r\xad\xa0\x10\x1f\xf1cJ[\xa1\x81>\x9c\xb6$\xb2\xf0\xdb\x85\x80Q0\x01\x13\x17\x93Lf\xe6\xde\x93\xde\x14a!\x8d\x06\x17Z']11:10
mgzhm... new in the last few days I take it?11:10
jmlmgz: new today for me11:11
jmllightweight checkout11:11
mgzwe upgraded launchpad to bzr 2.5.1 which has some new fancy for doing some operations over the smart server that weren't before11:11
mgzso, please file a bug with as much info as possible.11:11
jmlok.11:12
mgzobvious work around is have a local trunk branch that you branch from, so diffs from lwc use that11:13
jmlyeah, I'm doing that right now11:13
mgzthanks jml.11:13
jmlhuh, apparently a lock has been taken11:13
mgz...you might need to manuall break it11:13
mgzalso worth putting in the bug report11:13
mgzah... launchpad might be unhappy right now?11:14
jmlmgz: https://bugs.launchpad.net/bzr/+bug/104626511:18
ubot5Ubuntu bug 1046265 in Bazaar ""Could not understand response from smart server" when diffing lightweight checkout of LP branch" [Undecided,New]11:18
mgzis it repoducable, I neglected to ask?11:18
jmlmgz: yes, although I haven't tried from a fresh light-weight checkout, only one that already existed.11:19
jammgz, jelmer: any success with the python-defaults stuff?11:45
jamjml: what were you using a lightweight checkout for that you were running diff? (the only specific common one I know of is the download-cache, but diff is pretty useless for tarballs)11:47
jmljam: a branch that contains only a config-manager configuration file, sourcedeps.conf11:48
jelmerjml: can you file a bug about this issue?11:48
jmljelmer: is https://bugs.launchpad.net/bzr/+bug/1046265 somehow insufficient?11:49
ubot5Ubuntu bug 1046265 in Bazaar ""Could not understand response from smart server" when diffing lightweight checkout of LP branch" [High,Confirmed]11:49
jamjelmer: he did file #1046265 was there another one?11:49
jelmerjml: worked on landing use-bzr-policy-open earlier, and am going to upload a new python-defaults soon11:49
jelmerjml: No, that's great - thanks11:49
jmljelmer: np.11:49
jelmerI didn't see that11:49
jamjelmer: use-bzr-policy-open?11:50
jaman lp branch11:50
jelmerjam: yep, to get launchpad to use the bzr code for safely opening branches11:50
jmlsee also $ bzr ci12:08
jmlCommitting to: bzr+ssh://bazaar.launchpad.net/~canonical-ca-hackers/ca-configs/txpkgme-configmanager/12:08
jmlmodified sourcedeps.conf12:08
jmlbzr: ERROR: bzrlib.errors.TooManyConcurrentRequests: The medium 'SmartSSHClientMedium(bzr+ssh://jml@bazaar.launchpad.net/)' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request.12:08
jmlTraceback (most recent call last):12:08
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code12:08
jml    return the_callable(*args, **kwargs)12:08
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1141, in run_bzr12:08
jml    ret = run(*run_argv)12:08
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases12:08
jml    return self.run(**all_cmd_args)12:08
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run12:09
jml    return self._operation.run_simple(*args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple12:09
jml    self.cleanups, self.func, *args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups12:09
jml    result = func(*args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 3688, in run12:09
jml    lossy=lossy)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 218, in write_locked12:09
jml    result = unbound(self, *args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 218, in commit12:09
jml    result = WorkingTree.commit(self, message, revprops, *args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 218, in write_locked12:09
jml    result = unbound(self, *args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 211, in commit12:09
jml    *args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/commit.py", line 290, in commit12:09
jml    lossy=lossy)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 132, in run12:09
jml    self.cleanups, self.func, self, *args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups12:09
jml    result = func(*args, **kwargs)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/commit.py", line 452, in _commit12:09
jml    self.builder.abort()12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 217, in abort12:09
jml    self.repository.abort_write_group()12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 1212, in abort_write_group12:09
jml    suppress_errors=suppress_errors)12:09
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/repository.py", line 282, in abort_write_group12:10
jml    self._abort_write_group()12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 1708, in _abort_write_group12:10
jml    self._pack_collection._abort_write_group()12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 1565, in _abort_write_group12:10
jml    operation.run_simple()12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple12:10
jml    self.cleanups, self.func, *args, **kwargs)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups12:10
jml    result = func(*args, **kwargs)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 436, in abort12:10
jml    self.upload_transport.delete(self.random_name)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/remote.py", line 313, in delete12:10
jml    resp = self._call2('delete', self._remote_path(relpath))12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/remote.py", line 181, in _call212:10
jml    return self._client.call(method, *args)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 59, in call12:10
jml    result, protocol = self.call_expecting_body(method, *args)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 72, in call_expecting_body12:10
jml    method, args, expect_response_body=True)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 55, in _call_and_read_response12:10
jml    return request.call_and_read_response()12:10
jamjml: pastebin is your friend :)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 157, in call_and_read_response12:10
jml    return self._call(protocol_version)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 189, in _call12:10
jml    response_handler = self._send(protocol_version)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 265, in _send12:10
jml    encoder, response_handler = self._construct_protocol(protocol_version)12:10
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 241, in _construct_protocol12:11
jml    request = self.client._medium.get_request()12:11
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/medium.py", line 884, in get_request12:11
jml    return SmartClientStreamMediumRequest(self)12:11
jamalso, at least with a trivial branch here, I don't see the failure when creating a new lightweight checkout of a single-file single-commit branch and modifying it and committing.12:11
jml  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/medium.py", line 1167, in __init__12:11
jml    raise errors.TooManyConcurrentRequests(self._medium)12:11
jmlTooManyConcurrentRequests: The medium 'SmartSSHClientMedium(bzr+ssh://jml@bazaar.launchpad.net/)' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request.12:11
jmlbzr 2.6.0dev3 on python 2.7.3 (Linux-3.5.0-10-generic-x86_64-with-12:11
jml    Ubuntu-12.10-quantal)12:11
jmlarguments: ['/usr/bin/bzr', 'ci']12:11
jmlplugins: bash_completion[2.6.0dev3], branchdashboard[unknown],12:11
jml    bzrtools[2.5.0], changelog_merge[2.6.0dev3], damage[unknown],12:11
jml    difftodo[unknown], grep[0.5.0dev], launchpad[2.6.0dev3],12:11
jml    netrc_credential_store[2.6.0dev3], news_merge[2.6.0dev3],12:11
jamjml: so if this is a public thing, can you tar up your local checkout, and put it somewhere for us to test?12:11
jml    po_merge[2.6.0dev3], pqm[1.4.0dev], stats[0.2.0dev], svn[1.2.3dev],12:11
jml    weave_fmt[2.6.0dev3]12:11
jmlencoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'12:11
jml*** Bazaar has encountered an internal error.  This probably indicates a12:11
jml    bug in Bazaar.  You can help us fix it by filing a bug report at12:11
jml        https://bugs.launchpad.net/bzr/+filebug12:11
jml    including this traceback and a description of the problem.12:11
jmloops12:11
jmlsorry.12:11
jmlyou know that thing where hitting Ctrl-C doesn't always copy because something in Ubuntu is slower than I am? that.12:11
jmlI had meant https://bugs.launchpad.net/bzr/+bug/104628412:11
ubot5Ubuntu bug 1046284 in Bazaar "TooManyConcurrentRequests when committing to lightweight checkout" [Undecided,New]12:11
jmlno it's not12:11
jmljam: this is a different branch (I think)12:12
jmljam: chinstrap:~jml/txpkgme-configmanager.tar.gz12:12
jamjml: and this is using Q with the packaged bzr? or bzr.dev? or ?12:13
jmljam: packaged Q. (should I have included more information in the bug report?)12:14
jamjml: I think it has enough info there, but sometimes it is easier to just ask12:15
jml:)12:15
jamjml: bzr status says: bzr: ERROR: Not a branch: "bzr+ssh://bazaar.launchpad.net/~canonical-ca-hackers/ca-configs/txpkgme-configmanager/".12:16
jmljam: oh. well. it is a branch.12:16
jamjml: https://code.launchpad.net/~canonical-ca-hackers/ca-configs12:16
jamare you sure it isn't private?12:17
jmljam: oh yeah, it's private.12:17
jamso... I can't see it then :)12:17
jmljam: but not for any good reason that I know of12:17
jamjml: you are welcome to make it public, or add me for analysis purposes.12:17
jmljam: ah, right. you still work for Canonical, right? :P12:17
jam(and then kick me out later so I don't get bug spam)12:17
jamjml: I got paid last month, so I'm pretty sure I do12:17
jmljam: I've subscribed you to txpkgme-configmanager. Let me know if you need more access.12:21
jamjml: I can see it, and I can confirm that 'bzr diff' gives me a failure12:22
jmlcool.12:25
jamjml: ok, I think I've figured out the bug12:42
jamI'm not sure why the ordering is this way12:42
jambut essentially, the _iter_files_bytes code yields a 'call this function to get the content of the file'12:43
jamhowever, the outer code is never calling that function.12:43
jamwhich means the bytes of the file are still in the stream12:43
jamso the next iteration goes through and says "is there another record here" and gets the file content instead of the tail of the stream.12:43
jamjml, jelmer: I see why now, should be a simple-ish fix12:49
jelmerjam: Thanks for debugging that12:50
jelmerjam: Are you submitting a fix?12:50
jamjelmer: yeah, the specific issue is that WT4 is doing list(iter_files_bytes())[0]12:50
jamhowever, that consumes the iterator12:50
jam*before* it consumes the content.12:50
jelmerah12:50
jamso we just have to turn it into a for loop, etc.12:51
jamand then think about if we have a test hole.12:51
jamiter_files_bytes wasn't being used according to its spec, so one implementation did it differently (remoterepo vs local repo)12:52
jambut it wasn't detected because local repo caches the contents and returns a trivial function12:52
jamjelmer: interestingly, it looks like i'm the one to blame.12:54
jamback in rev 420412:54
mgzwell, that's nice.12:55
jelmerjam: to be fair, we never had that behaviour until recently12:55
jamjelmer,mgz: yeah it worked because we didn't actually implement iter_files_bytes as an RPC12:55
jamI wrote get_file_text back in bzr-1.14.. wow.12:56
mgzbut iters that happen to always be listiter then usage breaking when that changes kind of thing isn't uncommon12:56
jammgz: yeah, the issue is that you have to consume the callable returned as you iterate12:56
jamwhich I think has bit us once before, but it is pretty uncommon.12:56
mgz...I think those words would make sense if I'd put them together in the right order12:56
jammgz: well, I know the code and the problem, so it made enough sense to me :)13:00
jamjelmer, mgz: it has been a while since I dug into the hard bits. How would you set up a test for a lightweight checkout of a remote repository?13:09
jelmerjam: it depends a bit; for what you're hitting now I guess a blackbox test might be most appropriate?13:10
jamjelmer: I'd like to do a per-wt test sort of thing.13:10
jelmerjam: There are no tests verifying wt against a specific remote branch I think13:11
jamjelmer: yeah, which I think is part of the testing hole I mentioned earlier.13:11
jelmerjam: perhaps just add a test in bzrlib/tests/per_workingtree/ that sets up some remote branch and gets the wt to use that, if they are compatible?13:11
mgzjam: probably subclass TestCaseWithTransport then parametrise against classes in bt.test_server13:12
mgzReadonlySmartTCPServer_for_testing should do, can then operate on branch locally the check it out, and make some tree changes, and diff13:14
jammgz: well, I only need to call 'wt.get_file_text()' with a backing of a remote repo, so 'dif' isn't necessary13:15
jam(it is also why commit fails, etc.)13:15
mgzdoesn't seem like per_workingtree has any remote tests13:15
jamwell, I'm guessing, I didn't try to commit to a branch that isn't mine :)13:15
jamright13:15
idnarso there's `bzr deleted` and `bzr renames`; is there anything like `bzr modified`?13:32
idnarI'm looking for something nicer than bzr status -S | horrible-shell-hacking-here13:33
mgzidnar: what would be calling that?13:34
idnarI want to open all modified (and added, for that matter) files in my editor; so something like gvim -p $(bzr blahblah) would be my usage13:35
idnarit's not too important, I was just wondering if I missed something easy13:35
mgzhm, so writing shell is probably no worse than using the python bzrlib api or a plugin13:46
fullermdls is more the interface intended for that.13:47
mgzodd, ls seems to be showing me ignored files by default13:49
mgzand lots of files that are not in fact modified...13:50
fullermdHm, I thought ls had --modified and --deleted and such. But the help doesn't list them.13:50
mgzidnar: so, that's probably what you want, you might just need to submit some patches to fix it first :)13:51
micahgbzr: ERROR: zlib.error: Error -3 while decompressing: incorrect header check   trying to branch a local git repo to bzr14:42
hariomWhat are pros and cons of creating bzr repo in non root user space15:12
mgzhariom: I don't know exactly what you mean, but I can't think of any reason you'd want to do it.15:14
mgzmicahg: is that a bug report or an observation?15:15
micahgmgz: it's an observation, I'm happy to file a bug report if appropriate :)15:15
micahggoogle was not forthcoming with a matching bug report15:15
mgzwithout traceback context (see .bzr.log) it's hard to suggest anything15:16
micahgmgz: http://paste.ubuntu.com/1187398/15:17
mgzgenerally errors from zlib mean a data file has been corrupted, but branching from git (which doesn't use the same mechanisms) might mean it's a dulwich bug or something15:18
* micahg wishes he knew the equivalent of bzr check for git15:21
mgzright, was going to suggest that, but also don't know it15:22
mgzcould set BZR_PDB=1, repeat the operation, step up the stack trace a bit and see if the packfile looks sane15:24
mgzmicahg: either way, a bug report against dulwich would not hurt15:35
gmarkallwould the bzr check equivalent be git fsck, maybe with --full and/or --strict?15:37
micahggmarkall: ooh, thanks15:39
=== abentley is now known as abentley-lunch
micahgmgz: consistency check finished, checkout still failed, I guess a dulwich bug it is then16:31
=== abentley-lunch is now known as abentley
mgzoh, pants18:24
mgzhow do I cancel a pqm run...18:24
lifelesssudo make me a sandwhich18:27
mgzI fear that won't work.18:27
lifelesssandwich then18:27
mgzand it's past the merge step to renaming the branch from under it is no good.18:27
mgz...I don't have rights to uncommit from bzr.dev so can't fixup afterwards either18:28
lifelessland the reverse patch.18:29
lifelessuncommit on public branches is evil anyhow.18:29
mgzhow much will webops hate me if I ask them to kill the process on whatever machine bzr's pqm runs on these days?18:29
lifelesswell, thats what I meant by sudo :P18:29
mgzthe merge will work, it's just targetted at the wrong branch, so will confuse the history18:29
lifelessits a fairly routine request - is it mid test run ?18:29
mgzyup,18:30
mgzthanks lifeless. I really must let launchpad load the diff before sending these routine things to land.18:32
=== deryck is now known as deryck[afk]
chinotohttp://doc.bazaar.canonical.com/beta/en/admin-guide/simple-setups.html#using-a-restricted-ssh-account-to-host-multiple-users-and-repositories18:57
chinotoso my coworker decided to use that link to restrict access to our dev server so... "outsource workers"? could work on a project with us, but I can't even do a simple "bzr whoami"18:58
chinotoshnarf19:09
mgzchinoto: why would you want to run `bzr whoami` on the dev server?19:11
mgzand what exactly is the problem you're having?19:12
chinotowell I wanted to run "bzr update", but it didn't work so I decided to try a simpler command and saw whoami19:16
chinotowe have lines like this in '.ssh/authorized_keys'19:20
chinotocommand="bzr serve --inet --allow-writes --directory=/home/bzr/repo",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AAA...= XYZ19:20
chinotoand I tried to do 'ssh bzr@dev.ffusa.net "bzr whoami"', but it just blinked at me...19:20
maxbchinoto: you misunderstand how that ssh authorized keys stuff works - it means you cannot run commands on the server, so of course ssh host command does not work19:29
chinotoperhaps it isn't misunderstanding, but not understanding in the first place :319:33
chinotoso I'm guessing this means I can only interact with the server through local bzr commands (eg 'bzr log --line :parent'). in order to update the server's working tree I would have to ssh in as a different user and do 'sudo -u bzr bzr update'?19:42
lifelessif you have a working tree19:43
lifelessservers generally don't19:43
chinotowell we do19:43
lifelessyou may want bzr-upload for publishing a website, for instance.19:43
=== deryck[afk] is now known as deryck
=== mwhudson_ is now known as mwhudson

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