Bzr

http://muse.19inch.net/~jr/kubuntu-tutorials-day/03-bzr-and-launchpad.pdf

[16:32] <Riddell> apt-get install bzr
[16:32] <Fu86> I like SVN but i am open for new stuff :)
[16:32] <kwilliam> is bzr for advanced developers? i've never used svn
[16:32] <Riddell> is always a good start
[16:32] <Riddell> bzr is for everyone
[16:32] <iRon> Riddell: bzr is more like svn or mercurial (git) ?
[16:33] <Riddell> bzr, or more properly Bazaar is the world best revision control system
[16:33] <thefoxx> is there a way to sync between svn and bzr? when I develop something with eclipse I want to use it's nice svn integration
[16:33] <Riddell> hang on, questions in a bit
[16:33] <cheguevara> bzr-svn
[16:33] <Riddell> it keeps track of your files
[16:33] <Riddell> so if you make a mistake you can go back a look at what happened
[16:34] <Riddell> unlike svn or cvs, it's very easy to branch
[16:34] <DreadKnight> is there a native QT bzr browser?
[16:34] <Riddell> so if you don't have access to the svn archive
[16:34] <Riddell> or if you're doing something at all experimental
[16:34] <Riddell> you can just branch
[16:34] <Riddell> do your work in the branch
[16:34] <Riddell> and merge back later
[16:34] <Riddell> bzr has the best merging out of any revision control system
[16:34] <Riddell> they're very proud of how well it works
[16:34] <Riddell> but there's more!
[16:34] <limac> so when r we beginning?
[16:34] <cheguevara> DreadKnight, may be we should all write one with your brand new pyqt knowledge :P
[16:35] <thefoxx> is there any gui?
[16:35] <Riddell> other revision control systems need their own servers set up
[16:35] <cheguevara> bzr-gtk
[16:35] <Riddell> but bzr is super easy to get started
[16:35] <thefoxx> for the first steps I think it would be easyer
[16:35] <thefoxx> thx
[16:35] <DreadKnight> cheguevara: i'm not actually a programer :) but it sounds good
[16:35] <Riddell> to get started just make a new directory
[16:35] <Riddell> mkdir files
[16:35] <Riddell> cd file
[16:35] <Riddell> cd files  rather
[16:35] <DreadKnight> don't like to use the gtk one (olive i think it's called)
[16:35] <limac> any specific name?
[16:35] <Riddell> and  bzr init
[16:35] <Riddell> then save a file in that directory
[16:36] <Riddell> echo hello > myfile
[16:36] <Riddell> add it to the repo
[16:36] <Riddell> bzr add myfile
[16:36] <Riddell> and finally commit it
[16:36] <Riddell> bzr commit
[16:36] <Riddell> it'll ask you for a commit message, so you just say "inital commit"
[16:37] <Riddell> now bzr works easily off your local hard disk
[16:37] <cheguevara> Committed revision 1.
[16:37] <Riddell> excellent, gold star to cheguevara
[16:37] <cheguevara> :P
[16:37] <Riddell> but it can also work off any network system, like a web server
[16:37] <thefoxx> works here too, it's easy but right now same as svn ;)
[16:37] <DreadKnight> Riddell: want to menthor me to make a pykde bzr GUI ? xD
[16:37] <Riddell> so you can just copy that directory to a web server
[16:38] <Riddell> and now anyone can get hold of your revision control
[16:38] <Riddell> we use bzr for the kubuntu.org website
[16:38] <Riddell> I edit the files directly on the server
[16:38] <thefoxx> hm sorry no not really for svn you need an extern directory for svn repository...
[16:38] <thefoxx> nice
[16:38] <Riddell> and bzr commit after any changes I made
[16:38] <egonw> Riddell: doesn't that require some apache settings changed?
[16:38] <Riddell> now if this was svn, only I can do anything with it
[16:38] <Riddell> egonw: nope
[16:38] <Riddell> it works off any web server
[16:38] <Riddell> no changes needed
[16:38] <egonw> mmm, sounds good :)
[16:39] <Riddell> or smb, or local hard disk, or ftp, whatever
[16:39] <Riddell> sftp too
[16:39] <elisiano_> I don't get it
[16:39] <elisiano_> how?
[16:39] <cheguevara> magic
[16:39] <Riddell> there's a hidden .bzr directory with all the meta data
[16:39] <Riddell> that's what gets made with bzr init
[16:39] <Riddell> unlike subversion, it's only one .bzr directory per archive
[16:39] <Riddell> not one per directory
[16:40] <Riddell> so anyone can do bzr branch http://kubuntu.org
[16:40] <Fu86> do I need a physical copy of the directory to work on or is there a "checkout"-feature?
[16:40] <Riddell> that'll probably take a few minutes to run
[16:40] <Riddell> but then anyone can make changes to the files
[16:40] <Riddell> you can then do  bzr diff  and send me the patch
[16:41] <Riddell> or you can put it on a web server yourself and I can do  bzr merge http://your.web.server.com/~me/
[16:41] <wolfger> Format <RepositoryFormat6> for http://kubuntu.org/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
[16:41] <Riddell> hah, that server has an old bzr version on it
[16:41] <thefoxx> Riddell, it's nice that you can do branch kubuntu.org but if I dont want that, if I want to use a "private" archive - can I do commit and update like with svn but don't init a own repository? dont know wether you understand waht I mean...
[16:41] <Riddell> bzr is a fast moving project, but it has always remained backwards compatible
[16:42] <Riddell> thefoxx: yes you can
[16:42] <Riddell> branches do take time, you don't always need to do it
[16:42] <Riddell> so you can also just checkout
[16:42] <elisiano_> omg, I'm downloading the kubuntu.org branch
[16:42] <Riddell> which is what svn users are used to
[16:42] <thefoxx> sounds nice...
[16:42] <thefoxx> and thats about acl?
[16:42] <thefoxx> *whats
[16:42] <Riddell> for example
[16:42] <Riddell> we host some of our packaging in bzr
[16:43] <Riddell> on launchpad
[16:43] <Riddell> here's the webpage for our amarok packaging
[16:43] <Riddell> https://code.edge.launchpad.net/~kubuntu-members/amarok/debian
[16:43] <Riddell> sorry https://code.launchpad.net/~kubuntu-members/amarok/debian to non-beta testers
[16:43] <Riddell> that'll tell you that you can do  bzr branch http://bazaar.launchpad.net/~kubuntu-members/amarok/debian
[16:43] <Riddell> but for those of us lucky enough to be in kubuntu-members
[16:44] <Riddell> we can do   bzr checkout
[16:44] <Riddell> and commit back directly
[16:44] <Riddell> there's no access control list, access is just governed by the permissions of the server its on
[16:44] <Riddell> or local file system
[16:44] <Riddell> now, I need a volunteer!
[16:44] <thefoxx> can I use apache htaccess to protect it?
[16:45] <nareshov> me
[16:45] <nareshov> volunteers
[16:45] <Riddell> nareshov: please register a project for us on launchpad  https://code.launchpad.net/projects/+new
[16:45] <Riddell> call it kubuntu-tutorial say
[16:45] <Riddell> thefoxx: http is read only, so nobody can commit to it
[16:45] <nareshov> okay
[16:46] <Fu86> do it, do it! :D
[16:46] <Riddell> thefoxx: you can use sftp (ssh) for read/write archives, and then access it just who can write to the files
[16:46] <thefoxx> hm yes... logical
[16:46] <Riddell> now we're all going to upload branches to launchpad
[16:46] <thefoxx> okay I think I understand - sounds nic
[16:46] <thefoxx> e
[16:46] <Riddell> launchpad is a great place to host your bzr branches
[16:47] <nareshov> done
[16:47] <Riddell> but as I say, you can host it on any server
[16:47] <nareshov> https://code.launchpad.net/kubuntu-tutorial
[16:47] <thefoxx> but in my opinion it makes acl a bit more difficult but easyer to understand
[16:47] <Riddell> unlike Source Forge you don't need to ask to create a project
[16:47] <Riddell> anyone can make a project at any time and you can host any free software code there
[16:47] <Riddell> thanks nareshov
[16:48] <Riddell> if you have your bzr archives you can now push your code to launchpad
[16:48] <k_william> Riddell: that's awesome
[16:48] <ropiku> Riddell, ssh is the only way to rw ? That means that every commiter must have a ssh account ?
[16:48] <elisiano_> so in nareshov projects how do we retrieve the branch?
[16:48] <elisiano_> project*
[16:49] <Riddell> bzr push sftp://bazaar.launchpad.net/~<lp-name>/<projectname>/<branch-name>
[16:49] <Riddell> you'll need an account on launchpad
[16:49] <Riddell> and you'll need your ssh key registered on launchpad
[16:49] <nareshov> hmm
[16:50] <DreadKnight> nice
[16:50] <Riddell> if you don't have an ssh key make one with ssh-keygen
[16:50] <Riddell> and follow the prompts
[16:50] <Riddell> then paste the ~/.ssh/id_dsa.pub in launchpad
[16:51] <Riddell> https://launchpad.net/~<lp-name>/+editsshkeys
[16:51] <wolfger> error on the push
[16:51] <wolfger> Unable to import paramiko (required for sftp support): No module named paramiko
[16:51] <Riddell> then bzr push sftp://bazaar.launchpad.net/~<lp-name>/kubuntu-tutorial/mybranch
[16:51] <Riddell> sudo apt-get install python-paramiko
[16:51] <Riddell> wolfger: ^^
[16:51] <ropiku> so I do a init, commit something then push ?
[16:51] <Riddell> paramiko is needed for sftp access
[16:51] <Riddell> ropiku: yes
[16:52] <mzungu> Riddell, what would be the best way for a small group, geographically separated, to work with bzr privately - each on his own branch - how then to sync?
[16:53] <Riddell> mzungu: you can also register teams on launchpad
[16:53] <Riddell> then add the people to that team and push to a team branch
[16:53] <Riddell> just push to ~myteam
[16:53] <Riddell> which is what we do with the kubuntu packaging I showed earlier
[16:53] <wolfger> how to verify RSA key fingerprint of bazaar.launchpad.net?
[16:53] <Riddell> wolfger: just accept it
[16:53] <Riddell> worry if it changes
[16:53] <mzungu> ok - but for private code?
[16:54] <Riddell> so then anyone in the team can checkout and commit back (or branch as anyone outside the team can do)
[16:54] <limac> Riddell: what's sftp?
[16:54] <nareshov> ssh+ftp :P
[16:54] <DreadKnight> secure ftp?
[16:54] <Riddell> mzungu: on non public code you can just do it on a local machine you have ssh access to
[16:54] <Riddell> mzungu: and store it in a group writable directory
[16:54] <RinTinTigger> packing 101 on now?
[16:54] <wolfger> Permission denied (publickey).
[16:54] <mzungu> ok - thanks
[16:54] <Riddell> RinTinTigger: 5 minutes
[16:54] <Riddell> wolfger: have you uploaded your ssh key to launchpad
[16:55] <nareshov> wolfger: did you import your key?
[16:55] <limac> but whut's ftp?
[16:55] <DreadKnight> file transfer protocol
[16:55] <limac> ah!
[16:55] <wolfger> I have 1 OpenPGP key and one SSH key on Launchpad
[16:55] <Riddell> if we now look at https://code.launchpad.net/kubuntu-tutorial/
[16:55] <limac> so whut's exactly the purpose of bzr?
[16:55] <Riddell> we can see there's a branch there
[16:56] <wolfger> maybe my SSH key is from my (non-existant) Feisty install?
[16:56] <thefoxx> which python module provides question_dialog ?
[16:56] <DreadKnight> limac: versioning system, used for software development
[16:56] <dholbach> wolfger: best to double check
[16:56] <ropiku> weird, Launchpad user doesn't have a registered SSH key
[16:56] <Riddell> gold star to nareshov
[16:56] <thefoxx> it should be dialog as I see but it's not included in python dialog package...
[16:56] <nareshov> yay :D
[16:56] <thefoxx> yes, dialog, but not question_dialog
[16:56] <limac> DreadKnight: thx dude and wat about svn?
[16:56] <Riddell> so now we can all branch nareshov's code and edit it
[16:56] <Riddell> then he can merge back our changes if he likes them
[16:57] <Riddell> (actually it'll take a minute for launchpad to sync the branch)
[16:57] <Riddell> ok, I did promise branching from svn
[16:57] <ropiku> I imported my key (SSH public key added.) and pushed into sftp://bazaar.launchpad.net/~ropiku/kubuntu-tutorial/ropiku-branch
[16:57] <DreadKnight> limac: bzr is somewhat better ;)
[16:57] <Riddell> there's two ways to do that
[16:57] <Riddell> you can do it in launchpad
[16:57] <limac> but wat is svn?
[16:58] <Riddell> svn is subversion
[16:58] <Riddell> it's an older alternative to bzr
[16:58] <limac> ok! :)
[16:58] <Riddell> used by KDE, Gnome and many others
[16:58] <Riddell> we have an import of amarok in launchpad at https://code.launchpad.net/~vcs-imports/amarok/trunk
[16:58] <Riddell> so if you don't have a KDE subversion account you can just branch that and edit the code
[16:58] <Riddell> then send back your patches
[16:58] <thefoxx> did anyone uses bzr-svn ?
[16:58] <nareshov> ah
[16:58] <Riddell> the second way to branch svn is with bzr-svn
[16:58] <limac> and is there going to be any packaging tutorials today?
[16:58] <Riddell> apt-get install bzr-svn
[16:59] <Riddell> and branch it locally on your own system
[16:59] <RinTinTigger> 2 mins
[16:59] <ropiku> can someone help me a bit, please :D
[16:59] <dholbach> limac: read the topic and check out the link
[16:59] <Riddell> this has the nifty way of being able to commit changes back directly
[16:59] <Riddell> so now we can branch the debian packaging for some KDE related libraries for example
[16:59] <Riddell> bzr branch svn://svn.debian.org/pkg-kde/krap
[16:59] <thefoxx> does bzr svn allows to permanently sinc svn and bzr?
[17:00] <Riddell> unfortunately there's a memory leak in bzr-svn
[17:00] <Riddell> so importing from KDE using it will kill your system unless you stop it and restart after every 1000 commits it scans
[17:00] <nareshov> ooh
[17:00] <Riddell> but hopefully that will be fixed soon and people without KDE svn account, or people doing experimental work can branch KDE apps and edit
[17:00] <RinTinTigger> is GNOME better then KDE
[17:00] <RinTinTigger> ?
[17:01] <Riddell> RinTinTigger: no flames please
[17:01] <RinTinTigger> sry
[17:01] <Riddell> ok, we're out of time
[17:01] <elisiano_> RinTinTigger: are you trying to flame? :D
[17:01] <Riddell> jpatrick: are you here?
[17:01] <jpatrick> Riddell: yep
[17:01] <dholbach> rock and roll - thank Riddell for another great session
[17:01] <RinTinTigger> elisiano:no
[17:01] <Riddell> please ask me questions in #kubuntu about the bzr tutorial
[17:01] <xRaich[o]2x> Riddell: thanks for the tutorial :)
[17:01] <Riddell> or ask on #bzr
[17:01] <jpatrick> Evening everyone, by the end of this hour we should have some .deb files laying around. :)
[17:01] <dholbach> s/thanks/thank
[17:01] <limac> Riddell: thx dude u helped us a lot! :D
[17:01] <RinTinTigger> :D
[17:01] <dholbach> rock on jpatrick
[17:01] <Riddell> and watch out for Bazaar 1.0 coming very soon
[17:01] <nareshov> thanks a lot Riddell
[17:01] <RinTinTigger> thanks Riddel
[17:01] <RinTinTigger> L
[17:02] <thefoxx> thanks
[17:02] <jpatrick> For this you'll need to have the "pbuilder devscripts debootstrap fakeroot lintian" packages installed.
[17:02] <gourgi> thanks :D