[01:03] <kingos> hi all, I am trying to hack together something, and just need some basic info
[01:04] <jelmer> hi kingos
[01:04] <kingos> Given I have a revision, how can I call bzrlib/diff.py show_diff_trees
[01:04] <kingos> hi jelmer :)
[01:05] <kingos> specifically, where do I get the old_tree and new_tree from
[01:05] <jelmer> kingos, you can get old and tree new from a repository
[01:05] <kingos> ok
[01:05] <jelmer> kingos, more specifically, from the revision_tree() method
[01:05] <jelmer> alternatively, either one of them can be a WorkingTree instance
[01:06] <kingos> I want to do the equivalent of diff -c
[01:06] <kingos> I already have a revision, must have it from a repository I guess.
[01:06] <kingos> so do I do something like repository.revision_tree(revision)?
[01:06] <jelmer> kingos, a revision object you mean?
[01:06] <kingos> yeah
[01:06] <kingos> I already have a revision object.
[01:07] <jelmer> revision_tree takes a revision id - so e.g. revision.revision_id
[01:07] <kingos> ok
[01:07] <jelmer> if you want -c like behaviour you'd need the left hand side parent
[01:07] <jelmer> so revision.revision_id for new_tree, revision.parent_ids[0] for the old_tree
[01:07] <kingos> so I should be able to do repository.revision_tree(revision.revision_id), repository.revision_tree(revision.parent_ids[0])
[01:07] <kingos> sweet
[01:08] <jelmer> kingos, yep
[01:08] <kingos> do I need to worry about all this locking?
[01:09] <jelmer> kingos, not for these calls
[01:11] <kingos> jelmer: is there a way I can get a repository from a revision?
[01:14] <kingos> jelmer: don't worry, passed it in from earlier
[01:18] <kingos> bzr: ERROR: exceptions.NameError: global name 'osutils' is not defined
[01:18] <kingos> bzr.dev/bzrlib/commands.py", line 926, in exception_to_return_code
[01:20] <spiv> kingos: presumably you need a "from bzrlib import osutils" among your imports
[01:22] <kingos> so, I know this is probably basic python, but if I just declare a variable (ie. string) like:
[01:23] <kingos> str = ''
[01:23] <kingos> then call ret = show_diff_trees(old_tree, new_tree, str)
[01:23] <kingos> is that ok?
[01:24] <kingos> ok, as well, now that I import osutils, I still have a problem with that exception_to_return_code.
[01:25] <Buttons840> 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] <kingos> 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] <jelmer> Buttons840, create a new branch with the revisions you want, then run "bzr merge --uncommitted ../original-branch" in that branch
[01:27] <kingos> more specifically, IndexOutOfRange in "exception_to_return_code"
[01:29] <jelmer> kingos, Can you pastebin the full backtrace? exception_to_return_code is probably not where the actual exception is being raised from
[01:33] <Buttons840> jelmer: thank you
[01:33] <jelmer> Buttons840, np
[01:33]  * jelmer gets some sleep
[01:50] <kingos> jelmer: it doesn't like the parent_ids
[01:50] <kingos> ie. old_tree = repository.revision_tree(revision.parent_ids[0])
[01:55] <spiv> kingos: can you pastebin the full traceback?
[01:55] <kingos> well, that is pretty much it
[01:55] <kingos> I mean, it is code I am writing.
[01:55] <kingos> I have a revision object, it correctly has a revision_id, but parent_ids is empty.
[01:56] <kingos> when I print revision.parent_ids, I get: parent_ids is : []
[01:57] <spiv> So it is a revision with no parents.
[01:57] <kingos> ok
[01:57] <spiv> Presumably then its revision_id is "null:"
[01:58] <kingos> no
[01:59] <kingos> revision id is:  blah@bblah.com-20100905084816-c0d6456c1d5bec4e
[02:01] <spiv> Oh, it's probably the first revision.
[02:01] <spiv> As 'null:' isn't used as an explicit parent
[02:01] <kingos> it is revision 4 in my trunk
[02:02] <spiv> Then it has at least one parent, revision 3, by definition.
[02:02] <kingos> ah hang on, you are right
[02:02] <spiv> What does "bzr log --show-ids -r revid:blah@bblah.com-20100905084816-c0d6456c1d5bec4e" show
[02:02] <kingos> it must be the first revision
[02:03] <kingos> I forgot I was iterating over all revisions :)
[02:03] <kingos> so I guess now I need to work out if show_diff_trees handles a null old_tree
[02:05] <kingos> which it doesn't :(
[02:06] <kingos> is there an "empty tree"?
[02:06] <spiv> Sure
[02:07] <spiv> from bzrlib.revision import NULL_REVISION; empty_tree = repo.revision_tree(NULL_REVISION)
[02:07] <spiv> (where 'repo' is your repository object)
[02:10] <kingos> ok, that looks like it is working :)
[02:10] <kingos> now I tried passing a string into show_diff_trees, but it has no attribute "write"
[02:11] <kingos> what python object do I need to pass in?
[02:11] <kingos> don't want stdout, I just want the equivalent of a c++ stringstream
[02:11] <kingos> I appreciate trying to learn python by hacking bzr is probably not the best way of doing things
[02:12] <spiv> See the StringIO module in Python's standard library
[02:13] <spiv> (or the cStringIO module for a faster implementation of the same thing)
[02:13] <kingos> spiv: thanks a lot, think this is going to work :)
[02:13] <spiv> Learning python by hacking bzr is probably not the best way, but it's far from the worst!
[10:10] <leo2007> hello
[10:10] <leo2007> How to synchronise local branch to remote one?
[10:11] <leo2007> My tree is at rev 103687 where the remote is already at 103690
[10:11] <bob2> bzr pull <someurl>
[10:12] <leo2007> Some files are changed in my local tree. Can I go ahead and do that?
[10:13] <bob2> well, you should commit them
[10:13] <bob2> guess it depends if you use a bound branch or not, too
[10:13] <bob2> ugh bound branches
[10:24] <leo2007> 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] <spiv> 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] <spiv> leo2007: but probably it's not too hard to just open that file and resolve the conflict by hand.
[10:26] <leo2007> I have three files extra: .BASE .THIS and .OTHER
[10:28] <leo2007> excellent, seems resolved.
[10:29] <leo2007> How to set up a default url for bzr pull?
[10:30] <bob2> --remember
[10:30] <leo2007> Thanks very much.
[11:19] <leo2007> Is bzr push the way to propagate local commits to remote?
[12:01] <sobersabre> hi.
[12:02] <sobersabre> I want to create a tree which I can branch/checkout from out of a subdir of a root repository folder.
[12:02] <sobersabre> say /project is a repository.
[12:02] <sobersabre> inside it I have /project/module1
[12:02] <sobersabre> I want to create a REPOSITORY from /project/module1
[12:02] <sobersabre> I thought if I ran bzr split /project/module1
[12:03] <sobersabre> and then I ran bzr co /project/module1 mymodule1 somewhere I'd get what I want.
[12:03] <sobersabre> but what I got was: mymodule1/module1 which is NOT what I wanted.
[12:03] <sobersabre> I wanted to have mymodule, mapped to /project/module1 for commits/etc.
[12:26] <sobersabre> I found out I needed to commit some things.... works now!
[12:26] <sobersabre> thanks
[14:11] <x97mdr> hey all
[14:11] <x97mdr> Was wondering if anyone here has tried bazaar with the very latest releases of IronPython?
[14:13] <mgz> nope, but it will have the same issues the previous release had.
[14:14] <mgz> particularly, lack of an implementation for bzrlib.lock and lack of some required modules like zlib and bz2
[14:14] <mgz> see my old post to the bzr list for more details.
[14:15] <mgz> oh, and it's horribly slow.
[14:16] <mgz> 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] <x97mdr> 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] <mgz> it might be, and would probably work.
[14:17] <x97mdr> 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] <x97mdr> wouldn't do anything crazy with it, mainly push/pull/commit sorta stuff
[14:18] <mgz> if you can get the c# stuff needed for vs integration done, calling out to bzr for those operations isn't hard.
[14:19] <mgz> either by launching cpython, or merging up my noncpython branch and running directly
[14:19] <x97mdr> wth vs2010, writing source control providers is much easier than it was in previous versions
[14:20] <x97mdr> 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] <mgz> yeah, not to my knowledge.
[14:20] <x97mdr> thanks again
[14:22] <mgz> https://lists.ubuntu.com/archives/bazaar/2009q2/060028.html <- mailing list post I was talking about
[14:23] <mgz> 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] <mgz> you'll need my lock implementation, sys.platform changes, and jeff hardy's zlib module still.
[14:24] <x97mdr> i noticed that zlib is included in the official release now (2.7)
[14:24] <mgz> ah, one of the benefits of not being a ms-only project anymore then.
[14:25] <x97mdr> might need your lock implementation and sys.platform changes still though
[14:25] <mgz> I can merge up the old branch to current quite easily if you get as far as needing it.
[14:26] <x97mdr> 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] <x97mdr> I guess I will try your noncpython branch instead :)
[14:26] <mgz> yeah, try that to start.
[14:27] <mgz> it's lp:~gz/bzr/noncpython
[14:29] <x97mdr> 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] <x97mdr> if i can get your noncpython branch built, then i should try merging in the latest lp:bzr and retry?
[14:30] <mgz> it will probably be a somewhat painful merge, yell at me instead and I'll do it
[14:30] <x97mdr> ha! fair enough.  it looks like its been disconnected for a couple of years now?
[14:31] <x97mdr> i guess this was your post on stackoverflow was it: http://stackoverflow.com/questions/1909057/bazaar-vcs-under-ironpython
[14:31] <mgz> yup, both jython and ipy have just been too far off practicually usable, though there's still occasional interest
[14:32] <mgz> 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] <mgz> jython needs proper file handling code written for it that bypasses java.
[14:33] <mgz> ^and yup, that's me.
[14:34] <x97mdr> i guess one could try to keep a single process open and reuse it?
[14:35] <mgz> I'm not sure how VS wants things done, but you can probably run the code directly in-process
[14:35] <x97mdr> 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] <x97mdr> ok trying the compile on the noncpython branch
[14:42] <x97mdr> 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] <x97mdr> looks like its having trouble loading 'changelog_merge', 'news_merge' and 'weave_fmt' plugins
[14:43] <x97mdr> other than that its working like a charm
[14:44] <mgz> 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] <mgz> (and should be removed)
[18:14] <x97mdr> i removed the plugins and 'bzr plugins' works like a charm now
[18:15] <x97mdr> sorry, the above was for mgz :)
[18:16] <mgz> 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] <x97mdr> i will, thanks for the assist!
[20:16] <abli> 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] <abli> 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] <mwhudson> abli: there's a new thing by thumper called 'sloecode'
[20:23] <mwhudson> it's not gitosis-like wrt access control, though that might not be that hard
[20:24]  * abli checks out sloecode
[20:26] <abli> well, that looks (from the announcing blogpost) more like a 'launchpad lite'
[20:28] <abli> And the "Installing [...] is a bit messy" part is what I would like to avoid.
[20:29] <mwhudson> i said it was new :)
[20:30] <abli> Anyway, I managed to get bazitis work, so I might stick to that.
[20:30] <mwhudson> ah cool
[21:43] <thumper> abli: sloecode is designed to do primarily code hosting right now
[21:43] <thumper> abli: projects have repos and branches
[21:43] <thumper> abli: there are several active developers who are wanting to push it forwards
[21:44] <thumper> abli: the LP bits were the ssh authentication and plugin bits used as a starting point
[21:49] <coreGrl> hi
[21:50] <coreGrl> 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] <mgz> what interfaces does dropbox provide you? you may just be able to `bzr push ftp://...`
[21:52] <mgz> otherwise (with a few caveats, like shared repos) cp is fine too.
[21:57] <coreGrl> 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] <mgz> oh, it has its own client you run on your machines? ...why don't people just use the standard mechanisms...
[22:00] <mgz> 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] <coreGrl> mgz, cause it's for free :) they gives u more than 2GB of free space
[22:02] <mgz> 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] <mgz> 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] <coreGrl> tank you mgz
[22:06]  * mgz is crushed under the caterpillar tracks
[23:37] <GungaDin> 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] <GungaDin> how do I do that?
[23:52] <maxb> with reconfigure?
[23:52] <maxb> Surely you want bind for that?
[23:52] <fullermd> You probably want switch...
[23:53] <maxb> ahh... yes - don't use the word 'bind' here, it means something different in Bazaar terminology