=== psynaptic|away is now known as psynaptic [01:03] hi all, I am trying to hack together something, and just need some basic info [01:04] hi kingos [01:04] Given I have a revision, how can I call bzrlib/diff.py show_diff_trees [01:04] hi jelmer :) [01:05] specifically, where do I get the old_tree and new_tree from [01:05] kingos, you can get old and tree new from a repository [01:05] ok [01:05] kingos, more specifically, from the revision_tree() method [01:05] alternatively, either one of them can be a WorkingTree instance [01:06] I want to do the equivalent of diff -c [01:06] I already have a revision, must have it from a repository I guess. [01:06] so do I do something like repository.revision_tree(revision)? [01:06] kingos, a revision object you mean? [01:06] yeah [01:06] I already have a revision object. [01:07] revision_tree takes a revision id - so e.g. revision.revision_id [01:07] ok [01:07] if you want -c like behaviour you'd need the left hand side parent [01:07] so revision.revision_id for new_tree, revision.parent_ids[0] for the old_tree [01:07] so I should be able to do repository.revision_tree(revision.revision_id), repository.revision_tree(revision.parent_ids[0]) [01:07] sweet [01:08] kingos, yep [01:08] do I need to worry about all this locking? [01:09] kingos, not for these calls [01:11] jelmer: is there a way I can get a repository from a revision? [01:14] jelmer: don't worry, passed it in from earlier [01:18] bzr: ERROR: exceptions.NameError: global name 'osutils' is not defined [01:18] bzr.dev/bzrlib/commands.py", line 926, in exception_to_return_code [01:20] kingos: presumably you need a "from bzrlib import osutils" among your imports [01:22] so, I know this is probably basic python, but if I just declare a variable (ie. string) like: [01:23] str = '' [01:23] then call ret = show_diff_trees(old_tree, new_tree, str) [01:23] is that ok? [01:24] ok, as well, now that I import osutils, I still have a problem with that exception_to_return_code. [01:25] i've decided my current revisions are no good; i hate to throw my work away so i'm going to branch what i've done -- how can i create a new branch with the changes in my working tree (i don't want to commit or revert in my main branch) [01:25] I presume that must be because show_diff_trees is probably throwing an exception right, and for whatever reason it thinks I am trying to hook that exception up to a return code. [01:26] Buttons840, create a new branch with the revisions you want, then run "bzr merge --uncommitted ../original-branch" in that branch [01:27] more specifically, IndexOutOfRange in "exception_to_return_code" [01:29] kingos, Can you pastebin the full backtrace? exception_to_return_code is probably not where the actual exception is being raised from [01:33] jelmer: thank you [01:33] Buttons840, np [01:33] * jelmer gets some sleep === psynaptic is now known as psynaptic|away [01:50] jelmer: it doesn't like the parent_ids [01:50] ie. old_tree = repository.revision_tree(revision.parent_ids[0]) [01:55] kingos: can you pastebin the full traceback? [01:55] well, that is pretty much it [01:55] I mean, it is code I am writing. [01:55] I have a revision object, it correctly has a revision_id, but parent_ids is empty. [01:56] when I print revision.parent_ids, I get: parent_ids is : [] [01:57] So it is a revision with no parents. [01:57] ok [01:57] Presumably then its revision_id is "null:" [01:58] no [01:59] revision id is: blah@bblah.com-20100905084816-c0d6456c1d5bec4e [02:01] Oh, it's probably the first revision. [02:01] As 'null:' isn't used as an explicit parent [02:01] it is revision 4 in my trunk [02:02] Then it has at least one parent, revision 3, by definition. [02:02] ah hang on, you are right [02:02] What does "bzr log --show-ids -r revid:blah@bblah.com-20100905084816-c0d6456c1d5bec4e" show [02:02] it must be the first revision [02:03] I forgot I was iterating over all revisions :) [02:03] so I guess now I need to work out if show_diff_trees handles a null old_tree [02:05] which it doesn't :( [02:06] is there an "empty tree"? [02:06] Sure [02:07] from bzrlib.revision import NULL_REVISION; empty_tree = repo.revision_tree(NULL_REVISION) [02:07] (where 'repo' is your repository object) [02:10] ok, that looks like it is working :) [02:10] now I tried passing a string into show_diff_trees, but it has no attribute "write" [02:11] what python object do I need to pass in? [02:11] don't want stdout, I just want the equivalent of a c++ stringstream [02:11] I appreciate trying to learn python by hacking bzr is probably not the best way of doing things [02:12] See the StringIO module in Python's standard library [02:13] (or the cStringIO module for a faster implementation of the same thing) [02:13] spiv: thanks a lot, think this is going to work :) [02:13] Learning python by hacking bzr is probably not the best way, but it's far from the worst! === _thumper_ is now known as thumper [10:10] hello [10:10] How to synchronise local branch to remote one? [10:11] My tree is at rev 103687 where the remote is already at 103690 [10:11] bzr pull [10:12] Some files are changed in my local tree. Can I go ahead and do that? [10:13] well, you should commit them [10:13] guess it depends if you use a bound branch or not, too [10:13] ugh bound branches [10:24] bob2: thanks. I am behind slow connection which does make my experience a bit miserable. Anyway, I have encountered 'Text conflict in lisp/ChangeLog'. [10:24] leo2007: the bzr-changelog-merge plugin (which will be distributed with bzr 2.4 when that is ready) is likely to help there [10:25] leo2007: but probably it's not too hard to just open that file and resolve the conflict by hand. [10:26] I have three files extra: .BASE .THIS and .OTHER [10:28] excellent, seems resolved. [10:29] How to set up a default url for bzr pull? [10:30] --remember [10:30] Thanks very much. [11:19] Is bzr push the way to propagate local commits to remote? [12:01] hi. [12:02] I want to create a tree which I can branch/checkout from out of a subdir of a root repository folder. [12:02] say /project is a repository. [12:02] inside it I have /project/module1 [12:02] I want to create a REPOSITORY from /project/module1 [12:02] I thought if I ran bzr split /project/module1 [12:03] and then I ran bzr co /project/module1 mymodule1 somewhere I'd get what I want. [12:03] but what I got was: mymodule1/module1 which is NOT what I wanted. [12:03] I wanted to have mymodule, mapped to /project/module1 for commits/etc. [12:26] I found out I needed to commit some things.... works now! [12:26] thanks === psynaptic|away is now known as psynaptic === psynaptic is now known as psynaptic|away [14:11] hey all [14:11] Was wondering if anyone here has tried bazaar with the very latest releases of IronPython? [14:13] nope, but it will have the same issues the previous release had. [14:14] particularly, lack of an implementation for bzrlib.lock and lack of some required modules like zlib and bz2 [14:14] see my old post to the bzr list for more details. [14:15] oh, and it's horribly slow. [14:16] they got the startup down from tens of seconds to single digit seconds, but that's still painful for a command line tools, you'd not want to use it unless you were keeping a process running. [14:16] ahhh ok, thanks. was toying with the idea of adding Visual Studio support and thought maybe IronPython would be a good candidate to try implementing it with [14:17] it might be, and would probably work. [14:17] would love to see bazaar used more in my organization but without "visual studio support" the microsofties there likely won't look at it [14:17] wouldn't do anything crazy with it, mainly push/pull/commit sorta stuff [14:18] if you can get the c# stuff needed for vs integration done, calling out to bzr for those operations isn't hard. [14:19] either by launching cpython, or merging up my noncpython branch and running directly [14:19] wth vs2010, writing source control providers is much easier than it was in previous versions [14:20] ok thanks, i'll look into it more. i see there was a project that attempted an integration before but i guess it never came to fruition? [14:20] yeah, not to my knowledge. [14:20] thanks again [14:22] https://lists.ubuntu.com/archives/bazaar/2009q2/060028.html <- mailing list post I was talking about [14:23] since then, got fixes for most of the file handling issues landed in ipy, refcounting issues and a few unicode things fixed in bzr [14:24] you'll need my lock implementation, sys.platform changes, and jeff hardy's zlib module still. [14:24] i noticed that zlib is included in the official release now (2.7) [14:24] ah, one of the benefits of not being a ms-only project anymore then. [14:25] might need your lock implementation and sys.platform changes still though [14:25] I can merge up the old branch to current quite easily if you get as far as needing it. [14:26] i just tried compiling lp:bzr with this command line (%IPYDIR%ipy setup.py build_ext --allow-python-fallback install_lib --no-compile install) and got an ImportError: no module named tty [14:26] I guess I will try your noncpython branch instead :) [14:26] yeah, try that to start. [14:27] it's lp:~gz/bzr/noncpython [14:29] it's unfortunate one has to go through all this work to get vs integration when its really not necessary. some people just can't let go of the "checkin/checkout" idea in visual studio i guess :) [14:29] if i can get your noncpython branch built, then i should try merging in the latest lp:bzr and retry? [14:30] it will probably be a somewhat painful merge, yell at me instead and I'll do it [14:30] ha! fair enough. it looks like its been disconnected for a couple of years now? [14:31] i guess this was your post on stackoverflow was it: http://stackoverflow.com/questions/1909057/bazaar-vcs-under-ironpython [14:31] yup, both jython and ipy have just been too far off practicually usable, though there's still occasional interest [14:32] ironpython is mostly there (as zlib is now in, yeay), provided you're not launching processes all the time, which is just tooo slow still. [14:32] jython needs proper file handling code written for it that bypasses java. [14:33] ^and yup, that's me. [14:34] i guess one could try to keep a single process open and reuse it? [14:35] I'm not sure how VS wants things done, but you can probably run the code directly in-process [14:35] while i'm here i have to pass along kudos. i've been using bazaar for over a year now as a subversion "super-client" and its been magical, jut a great piece of software [14:37] ok trying the compile on the noncpython branch [14:42] hrm, seems to have mostly worked, getting a few errors though. keep in mind this is purely downloading ironpython 2.7 and your noncpython branch. no other extensions or changes [14:43] looks like its having trouble loading 'changelog_merge', 'news_merge' and 'weave_fmt' plugins [14:43] other than that its working like a charm [14:44] ha. yeah, I'd be suprised if many plugins worked... but those are from the latest version, which implies they got left over from your previous install attempt [14:44] (and should be removed) === Kilroo1 is now known as kilroo === psynaptic|away is now known as psynaptic [18:14] i removed the plugins and 'bzr plugins' works like a charm now [18:15] sorry, the above was for mgz :) [18:16] x97mdr: it would be good to post to the list if you make any progress with VS integration, there's been a fair bit of interest in that in the past [18:17] i will, thanks for the assist! === hunger_ is now known as hunger [20:16] Hi! is there a maintained gitosis-like thing for bzr? bazitis appears to have been last updated in 2008, and I am getting 'Permission denied' when I try to check out the admin repository, even though I am following the instructions to the letter. I would really like to use something gitosis-like, ie. where I can set permissions by commiting in a given repo, I assume others like this way of operation, too. [20:16] What is the recommended for light-weight, permission-controlled hosting of read-write bzr repos (i.e so one can branch from and push to the hosted repo) [20:22] abli: there's a new thing by thumper called 'sloecode' [20:23] it's not gitosis-like wrt access control, though that might not be that hard [20:24] * abli checks out sloecode [20:26] well, that looks (from the announcing blogpost) more like a 'launchpad lite' [20:28] And the "Installing [...] is a bit messy" part is what I would like to avoid. [20:29] i said it was new :) [20:30] Anyway, I managed to get bazitis work, so I might stick to that. [20:30] ah cool [21:43] abli: sloecode is designed to do primarily code hosting right now [21:43] abli: projects have repos and branches [21:43] abli: there are several active developers who are wanting to push it forwards [21:44] abli: the LP bits were the ssh authentication and plugin bits used as a starting point [21:49] hi [21:50] I've a little project under bzr, I want to backup it on dropbox, what's the best way to .."clone" a repository? cp? :) [21:52] what interfaces does dropbox provide you? you may just be able to `bzr push ftp://...` [21:52] otherwise (with a few caveats, like shared repos) cp is fine too. [21:57] mgz, uhm dropbox syncs a folder to with a web service, so you can sync this folder on different locations, suppose to have a repository at work, then copy it to dropbox, at home you can access to this folder with the copier repository [21:59] oh, it has its own client you run on your machines? ...why don't people just use the standard mechanisms... [22:00] anyway, yeah, that will work fine provided #1 you sync the bottom most folder that contains a .bzr directory and #2 the sync doesn't happen while bzr in running and then doesn't notice the full changes [22:00] mgz, cause it's for free :) they gives u more than 2GB of free space [22:02] I know that the ubuntu cloud thing amusingly didn't work with bzr (at one point at least), but anything that does file access sensibly should be fine, and windows locking will protect you better than nix does [22:03] if it's a click-to-sync rather than auto-sync then you can just make sure bzr has finished before you trigger it. [22:06] tank you mgz [22:06] * mgz is crushed under the caterpillar tracks === psynaptic is now known as psynaptic|away === marienz_ is now known as marienz === psynaptic|away is now known as psynaptic === psynaptic is now known as psynaptic|away === psynaptic|away is now known as psynaptic [23:37] I'm trying to rebind my checkout to a different branch with reconfigure but keep getting an error saying my directory isn't a branch [23:37] how do I do that? [23:52] with reconfigure? [23:52] Surely you want bind for that? [23:52] You probably want switch... [23:53] ahh... yes - don't use the word 'bind' here, it means something different in Bazaar terminology