=== psynaptic|away is now known as psynaptic
kingoshi all, I am trying to hack together something, and just need some basic info01:03
jelmerhi kingos01:04
kingosGiven I have a revision, how can I call bzrlib/diff.py show_diff_trees01:04
kingoshi jelmer :)01:04
kingosspecifically, where do I get the old_tree and new_tree from01:05
jelmerkingos, you can get old and tree new from a repository01:05
jelmerkingos, more specifically, from the revision_tree() method01:05
jelmeralternatively, either one of them can be a WorkingTree instance01:05
kingosI want to do the equivalent of diff -c01:06
kingosI already have a revision, must have it from a repository I guess.01:06
kingosso do I do something like repository.revision_tree(revision)?01:06
jelmerkingos, a revision object you mean?01:06
kingosI already have a revision object.01:06
jelmerrevision_tree takes a revision id - so e.g. revision.revision_id01:07
jelmerif you want -c like behaviour you'd need the left hand side parent01:07
jelmerso revision.revision_id for new_tree, revision.parent_ids[0] for the old_tree01:07
kingosso I should be able to do repository.revision_tree(revision.revision_id), repository.revision_tree(revision.parent_ids[0])01:07
jelmerkingos, yep01:08
kingosdo I need to worry about all this locking?01:08
jelmerkingos, not for these calls01:09
kingosjelmer: is there a way I can get a repository from a revision?01:11
kingosjelmer: don't worry, passed it in from earlier01:14
kingosbzr: ERROR: exceptions.NameError: global name 'osutils' is not defined01:18
kingosbzr.dev/bzrlib/commands.py", line 926, in exception_to_return_code01:18
spivkingos: presumably you need a "from bzrlib import osutils" among your imports01:20
kingosso, I know this is probably basic python, but if I just declare a variable (ie. string) like:01:22
kingosstr = ''01:23
kingosthen call ret = show_diff_trees(old_tree, new_tree, str)01:23
kingosis that ok?01:23
kingosok, as well, now that I import osutils, I still have a problem with that exception_to_return_code.01:24
Buttons840i'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
kingosI 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:25
jelmerButtons840, create a new branch with the revisions you want, then run "bzr merge --uncommitted ../original-branch" in that branch01:26
kingosmore specifically, IndexOutOfRange in "exception_to_return_code"01:27
jelmerkingos, Can you pastebin the full backtrace? exception_to_return_code is probably not where the actual exception is being raised from01:29
Buttons840jelmer: thank you01:33
jelmerButtons840, np01:33
* jelmer gets some sleep01:33
=== psynaptic is now known as psynaptic|away
kingosjelmer: it doesn't like the parent_ids01:50
kingosie. old_tree = repository.revision_tree(revision.parent_ids[0])01:50
spivkingos: can you pastebin the full traceback?01:55
kingoswell, that is pretty much it01:55
kingosI mean, it is code I am writing.01:55
kingosI have a revision object, it correctly has a revision_id, but parent_ids is empty.01:55
kingoswhen I print revision.parent_ids, I get: parent_ids is : []01:56
spivSo it is a revision with no parents.01:57
spivPresumably then its revision_id is "null:"01:57
kingosrevision id is:  blah@bblah.com-20100905084816-c0d6456c1d5bec4e01:59
spivOh, it's probably the first revision.02:01
spivAs 'null:' isn't used as an explicit parent02:01
kingosit is revision 4 in my trunk02:01
spivThen it has at least one parent, revision 3, by definition.02:02
kingosah hang on, you are right02:02
spivWhat does "bzr log --show-ids -r revid:blah@bblah.com-20100905084816-c0d6456c1d5bec4e" show02:02
kingosit must be the first revision02:02
kingosI forgot I was iterating over all revisions :)02:03
kingosso I guess now I need to work out if show_diff_trees handles a null old_tree02:03
kingoswhich it doesn't :(02:05
kingosis there an "empty tree"?02:06
spivfrom bzrlib.revision import NULL_REVISION; empty_tree = repo.revision_tree(NULL_REVISION)02:07
spiv(where 'repo' is your repository object)02:07
kingosok, that looks like it is working :)02:10
kingosnow I tried passing a string into show_diff_trees, but it has no attribute "write"02:10
kingoswhat python object do I need to pass in?02:11
kingosdon't want stdout, I just want the equivalent of a c++ stringstream02:11
kingosI appreciate trying to learn python by hacking bzr is probably not the best way of doing things02:11
spivSee the StringIO module in Python's standard library02:12
spiv(or the cStringIO module for a faster implementation of the same thing)02:13
kingosspiv: thanks a lot, think this is going to work :)02:13
spivLearning python by hacking bzr is probably not the best way, but it's far from the worst!02:13
=== _thumper_ is now known as thumper
leo2007How to synchronise local branch to remote one?10:10
leo2007My tree is at rev 103687 where the remote is already at 10369010:11
bob2bzr pull <someurl>10:11
leo2007Some files are changed in my local tree. Can I go ahead and do that?10:12
bob2well, you should commit them10:13
bob2guess it depends if you use a bound branch or not, too10:13
bob2ugh bound branches10:13
leo2007bob2: 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
spivleo2007: the bzr-changelog-merge plugin (which will be distributed with bzr 2.4 when that is ready) is likely to help there10:24
spivleo2007: but probably it's not too hard to just open that file and resolve the conflict by hand.10:25
leo2007I have three files extra: .BASE .THIS and .OTHER10:26
leo2007excellent, seems resolved.10:28
leo2007How to set up a default url for bzr pull?10:29
leo2007Thanks very much.10:30
leo2007Is bzr push the way to propagate local commits to remote?11:19
sobersabreI want to create a tree which I can branch/checkout from out of a subdir of a root repository folder.12:02
sobersabresay /project is a repository.12:02
sobersabreinside it I have /project/module112:02
sobersabreI want to create a REPOSITORY from /project/module112:02
sobersabreI thought if I ran bzr split /project/module112:02
sobersabreand then I ran bzr co /project/module1 mymodule1 somewhere I'd get what I want.12:03
sobersabrebut what I got was: mymodule1/module1 which is NOT what I wanted.12:03
sobersabreI wanted to have mymodule, mapped to /project/module1 for commits/etc.12:03
sobersabreI found out I needed to commit some things.... works now!12:26
=== psynaptic|away is now known as psynaptic
=== psynaptic is now known as psynaptic|away
x97mdrhey all14:11
x97mdrWas wondering if anyone here has tried bazaar with the very latest releases of IronPython?14:11
mgznope, but it will have the same issues the previous release had.14:13
mgzparticularly, lack of an implementation for bzrlib.lock and lack of some required modules like zlib and bz214:14
mgzsee my old post to the bzr list for more details.14:14
mgzoh, and it's horribly slow.14:15
mgzthey 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
x97mdrahhh 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 with14:16
mgzit might be, and would probably work.14:17
x97mdrwould love to see bazaar used more in my organization but without "visual studio support" the microsofties there likely won't look at it14:17
x97mdrwouldn't do anything crazy with it, mainly push/pull/commit sorta stuff14:17
mgzif you can get the c# stuff needed for vs integration done, calling out to bzr for those operations isn't hard.14:18
mgzeither by launching cpython, or merging up my noncpython branch and running directly14:19
x97mdrwth vs2010, writing source control providers is much easier than it was in previous versions14:19
x97mdrok 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
mgzyeah, not to my knowledge.14:20
x97mdrthanks again14:20
mgzhttps://lists.ubuntu.com/archives/bazaar/2009q2/060028.html <- mailing list post I was talking about14:22
mgzsince then, got fixes for most of the file handling issues landed in ipy, refcounting issues and a few unicode things fixed in bzr14:23
mgzyou'll need my lock implementation, sys.platform changes, and jeff hardy's zlib module still.14:24
x97mdri noticed that zlib is included in the official release now (2.7)14:24
mgzah, one of the benefits of not being a ms-only project anymore then.14:24
x97mdrmight need your lock implementation and sys.platform changes still though14:25
mgzI can merge up the old branch to current quite easily if you get as far as needing it.14:25
x97mdri 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 tty14:26
x97mdrI guess I will try your noncpython branch instead :)14:26
mgzyeah, try that to start.14:26
mgzit's lp:~gz/bzr/noncpython14:27
x97mdrit'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
x97mdrif i can get your noncpython branch built, then i should try merging in the latest lp:bzr and retry?14:29
mgzit will probably be a somewhat painful merge, yell at me instead and I'll do it14:30
x97mdrha! fair enough.  it looks like its been disconnected for a couple of years now?14:30
x97mdri guess this was your post on stackoverflow was it: http://stackoverflow.com/questions/1909057/bazaar-vcs-under-ironpython14:31
mgzyup, both jython and ipy have just been too far off practicually usable, though there's still occasional interest14:31
mgzironpython 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
mgzjython needs proper file handling code written for it that bypasses java.14:32
mgz^and yup, that's me.14:33
x97mdri guess one could try to keep a single process open and reuse it?14:34
mgzI'm not sure how VS wants things done, but you can probably run the code directly in-process14:35
x97mdrwhile 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 software14:35
x97mdrok trying the compile on the noncpython branch14:37
x97mdrhrm, 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 changes14:42
x97mdrlooks like its having trouble loading 'changelog_merge', 'news_merge' and 'weave_fmt' plugins14:43
x97mdrother than that its working like a charm14:43
mgzha. 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 attempt14:44
mgz(and should be removed)14:44
=== Kilroo1 is now known as kilroo
=== psynaptic|away is now known as psynaptic
x97mdri removed the plugins and 'bzr plugins' works like a charm now18:14
x97mdrsorry, the above was for mgz :)18:15
mgzx97mdr: 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 past18:16
x97mdri will, thanks for the assist!18:17
=== hunger_ is now known as hunger
abliHi! 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
abliWhat 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:16
mwhudsonabli: there's a new thing by thumper called 'sloecode'20:22
mwhudsonit's not gitosis-like wrt access control, though that might not be that hard20:23
* abli checks out sloecode20:24
abliwell, that looks (from the announcing blogpost) more like a 'launchpad lite'20:26
abliAnd the "Installing [...] is a bit messy" part is what I would like to avoid.20:28
mwhudsoni said it was new :)20:29
abliAnyway, I managed to get bazitis work, so I might stick to that.20:30
mwhudsonah cool20:30
thumperabli: sloecode is designed to do primarily code hosting right now21:43
thumperabli: projects have repos and branches21:43
thumperabli: there are several active developers who are wanting to push it forwards21:43
thumperabli: the LP bits were the ssh authentication and plugin bits used as a starting point21:44
coreGrlI've a little project under bzr, I want to backup it on dropbox, what's the best way to .."clone" a repository? cp? :)21:50
mgzwhat interfaces does dropbox provide you? you may just be able to `bzr push ftp://...`21:52
mgzotherwise (with a few caveats, like shared repos) cp is fine too.21:52
coreGrlmgz, 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 repository21:57
mgzoh, it has its own client you run on your machines? ...why don't people just use the standard mechanisms...21:59
mgzanyway, 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 changes22:00
coreGrlmgz, cause it's for free :) they gives u more than 2GB of free space22:00
mgzI 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 does22:02
mgzif it's a click-to-sync rather than auto-sync then you can just make sure bzr has finished before you trigger it.22:03
coreGrltank you mgz22:06
* mgz is crushed under the caterpillar tracks22:06
=== 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
GungaDinI'm trying to rebind my checkout to a different branch with reconfigure but keep getting an error saying my directory isn't a branch23:37
GungaDinhow do I do that?23:37
maxbwith reconfigure?23:52
maxbSurely you want bind for that?23:52
fullermdYou probably want switch...23:52
maxbahh... yes - don't use the word 'bind' here, it means something different in Bazaar terminology23:53

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