Moving files between git repositories

In our project we had to move several files between git repositories. Having searched the internet, there didn't seem to be any well defined way to do it. I don't claim to be a git wizard, but I came up with a solution that I wanted to share in case it was useful to anyone else.

There is a method to filter a folder in a git repository which can then be used to move between repositories, but not so easily for files. I came up with a method that effectively involves rewriting the history to put everything into a folder which we then steal.

As we are using filter-branch we first need to take a clone of the source repository. Filter-branch is a destructive command that actually edits the history and will destroy your repository.

#!/usr/bin/python
import os

files = ["service-availability-checker.cpp",
"service-availability-checker.h"]

for filename in files:
    if not os.access("keep", os.R_OK):
        os.mkdir("keep")
    if os.access(filename, os.R_OK):
       os.rename(filename, "keep/"+filename)

move-files.py

git filter-branch --tree-filter /path/to/move-files.py

Now we can grab the folder we wanted

git filter-branch --subdirectory-filter keep/

Now we turn the directory into a set of patches

git format-patch HEAD^ HEAD

This gives us a nice set of patch files which contain commit information which can be imported into a new repository.

KDE Telepathy 0.2 Approaching Hard Feature Freeze

KDE Telepathy 0.2 isn't too far away, so I thought I'd give a bit of a progress update.

We've mostly been working hard to tidy up and stabilise most of what we offered in 0.1, but we've also brought in a few shiny features:

Most anticipated of all, there is no longer a dependency on gnome-keyring! Upstream (telepathy) had provided a (mostly working) mechanism for us to provide our own passwords, so we have perfect KWallet integration.

Over the sprint I implemented drag+drop on our contact applet plasmoid so they interact nicely with the contact list.

We've made it even easier to see other contacts on your local network (bonjour) added auto away and "now playing" presence messages.

There's still a lot of things left to sort out, but 0.2 but it is shaping up to be a solid release!

We're about 1 week away from a hard feature freeze, aiming for a full release in early november. If you want to get involved, or start early beta testing please join us in #kde-telepathy.

Now for some pics and videos!

Vimeo Link

My Desktop Summit Roundup

It was an amazing week! I met some really cool people from both the Gnome and KDE camps, and had a fantastic time.

A particular personal highlight was attending the Gnome IM Integration BOF (what Gnome is doing with telepathy), some of the discussion wasn't relevant to me, but it was still incredibly productive and informative. I hopefully was able to help them with some parts, and they were able to help me with some technical issues I was facing. It was great to be able to talk to someone who had faced exactly the same problems only a few months ago, and had managed to come up with a way round it. When coming up with requirements for common backend components, the best way is for us to work together.

I spent a lot of my free time with part of the Gnome documentation team who gave me a lot of insight into ways KDE could do help a lot better.

I also had an opportunity to finally meet my GSOC student, Francesco, in real life. That was quite the (terrifying) experience 🙂

So many new ideas, new projects and not enough time to do it all!

We definitely need more close collaboration like this in order to make both Linux desktop environments achieve their full-potential.

Thanks to all the organisers, the rest of the volunteers and to the KDE eV for sponsoring my accomodation.

KDE Telepathy 0.1 – Part 2 of 5 – Account Management

This is the (very late)part two of our mini-series about why the tech preview KDE Telepathy 0.1 rocks.

One thing I really wanted to do with KDE Telepathy was making setting up accounts as easy as possible. Setting up common accounts like Facebook or Gmail should be only a few clicks away. It has all the server settings already set up, all that's needed is your name and password. We've tried to do this in a way that keeps things simple but still keeps really advanced options still available.

KDE Telepathy supports text chat in a wide range of different accounts. As many as Kopete, and more than Empathy.

KDE Telepathy is still very much a work in progress, but results are looking promising.

KDE Telepathy 0.1 Release on the 27th July

"The hope lies in the telepathy KDE guys, assuming they ever manage to get something out." - einar77 from Reddit.

After lots of delays, we're about ready to make our first release of KDE Telepathy, the new IM framework.

The release coincides with KDE4.7 and the release of digikam, so it's an exciting day to be part of KDE.

It's still very much an early release, there are plenty of things that are a work in progress, but it's showing plenty of promise.

KDE and LightDM

I'd like to share below details on a project I've been working on before I try pushing on the KDE mailing lists and seeing if there's any interest.

What is LightDM?

LightDM is a cross-desktop display manager (think KDM). It's designed to be fast and lightweight, it is written to replace GDM Gnome's display manager.

What makes LightDM interesting for KDE is it is designed to to have multiple 'greeters'. This is the front end that sits on top of the daemon and does the displaying to the user asking them for login details. This means we can have our own KDE interfaces, whilst the Gnome people do their different UIs all whilst sharing the same daemon that handles all the hard parts.

By having this this multiple greeter system, we don't need have to have just one KDE greeter. It becomes very easy to experiment with new ideas too. There was talk about a plasma interface to KDM which I don't think ever got anywhere. With LightDM and my QLightDM library writing a plasma greeter would only take a few evenings at most. (I remain convinced that using plasma here is a good idea, but I fully support anyone wanting to try.)

Each greeter could also be themeable, so this is a bit like KSplash; we have the normal KSplash engine with a big collection of themes, but we're in time also adding KSplashQML which is an engine to allow a different set of themes on a different technology.

What's wrong with KDM?

Nothing in particular. I'm not trying to oust that project or say anything bad about it (except I can't stand the KCM. There are far too many options that don't do anything if you're using a theme. Greeters help solve this.). I simply think this a cool project, which I'm getting involved in.

By using a cross-desktop project we get to share working on the daemon backend, so we will have wayland support at the same time Gnome does. I'm a massive fan of freedesktop projects and not duplicating work! It's much better to try and get involved from the start, so we can shape it where we want it to go.

What's been done?

I got interested in the project after seeing a post on Planet Ubuntu and thought "KDE could use some of this.". I've written a Qt library for making greeter engines, as well as a very basic demo greeter which is more for testing than a real demo of what can be done. This library is designed to be very QML-ready, with a strong emphasis on using models rather than simple lists.

This is all stored within the main lightdm source code repository.. There is also a PPA available if Kubuntu users want to try it out themselves.

I've got an idea in my head for the direction I want to take it with QML themes that will be hopefully lead to the same broad range of designs that KDM has, but more flexible whilst keeping a really sensible config dialog.

Alex Fiestas has been working on some changes in KDE4.7 to make sure suspend, shutdown and user switching work still work whilst using lightDM. Making it a fully replaceable manager.

Obligatory screenshot

If you'd understood the above you'll realise this is all about the backend library, and having a flexible structure, however I can't leave a blogpost without putting in a screenshot.

Planning the first release of KDE Telepathy

Given the various blog posts, and (somewhat unnecessary) hysteria over the news of Skype I felt like I should give an update on what's going on in KDE Telepathy.

Pace over the past 5 months has been ace, we've got a lot done, and as mentioned by a few people already - we're releasing "soon"! We don't have a fixed date, but instead we will release when a set list of outstanding bugs are fixed. Probably about 4 weeks time. (unless I die of stress organising it all in the meantime)

What's in this release?

There's not as much as we'd like, but we're making a concious effort to ship something that really works. You should be able to create any type of IM account and have basic contact-list tasks and have normal text chats.

At this stage nothing is really fixed, and we're in early stages of shaping where we're going. Hopefully you'll see what we're aiming for with KDE Telepathy and a start to the realisation of some of what telepathy is about.

This first release won't have all the nepomuk integration blogged about by George Goldberg, nor will it have audio/video chat. Rest assured that there are a lot of cool designs, ideas and even code floating around and that this will come, but only when it's ready.

There's still plenty of opportunity to get involved, we've got some junior jobs left that need doing. Testers are great, providing they're really willing to read a lot documentation and really get stuck in, there's quite a bit of effort needed in getting a working setup at present.

What else is coming?

We have a GSOC student that I'm mentoring over the summer to really nail bringing instant messaging into the core of the Plasma Workspace. I won't spoil the details as he'll be blogging soon, only to say it's an exciting time to be in KDE.

KDbg for KDE 4 Rc1

Before getting fully caught up in KDE Telepathy I helped out working on an interesting project Kdbg, a graphical front end to the debugger.

Whilst several IDEs have this built-in, a standalone program allows for more detailed data inspection, and is a useful tool when debugging code not set up in your IDE.

Version 2.4.95 is the release candidate of the first KDE 4 release, and I felt it deserved advertising on PlanetKDE.

Below is the mailing list announcement from the lead developer Johannes Sixt:


I've pushed out KDbg 2.4.95 to the git repositories at sourceforge and
repo.or.cz:

git://repo.or.cz/kdbg.git
git://kdbg.git.sourceforge.net/gitroot/kdbg/kdbg

(branch master).

KDbg is now ported to KDE4 and has also recived a slight face lift with new
button art work. The program icon should be exchanged, but I'm not an
artist...

Please report your impressions so that I can make the final release next week.

To compile the program after you checked it out:

1. create a build directory next to the source directory
2. cmake ../kdbg
3. use cmake-gui to check for a suitable CMAKE_INSTALL_PREFIX
4. make
5. (possibly as root) make install

Special thanks go to David Edmundson and Gilles Allard for their valuable help
in porting to KDE4.

What’s happening in KDE Telepathy

Since my last post things really have started to kick off; The account configuration module is looking a lot tidier and the process of creating per-protocol user interface is greatly simplified. A big thanks to the KDE Usability guys for taking the time to respond to my email.

We had an IRC meeting last Monday where we discussed what was left to be done, and assign tasks and maintainers for the various components.

We now have some-one starting writing a contact list, and we're making lists of outstanding tasks in the other areas, things are starting to shape up nicely.

As it's a blog post, most of you are just here for the obligatory screenshots:


If you saw the same ugly shots from last post, you'll see this is definitely progressing nicely.

FAQ

Will KDE Telepathy support <any protocol here> ?

This is the question I'm asked a lot, and the answer is always the same. "If Telpepathy supports it, then we'll make damn sure KDE has code to support it. If Telepathy doesn't, then there's no point asking us". An incredibly outdated wiki page listing the state is available here: http://telepathy.freedesktop.org/wiki/Protocols%20Support. Google is sometimes a more useful in this regard.

Can I help?

I'm busy writing up some instructions on getting started with a setup. Once that's done (hopefully the end of the week) I'll post to PlanetKDE again. Hold tight!

KDE Telepathy Hack Day

Just a reminder that today is a "get helping KDE Telepathy" hacking day.

I'll be in our IRC channel #kde-telepathy all day to help people get started on working on our accounts manager.

If you're interested in helping out with instant messaging and collaboration on KDE now would be a great time to get involved. Anyone with basic C++ skills will be able to help.

A list of the tasks we want to get done is here: http://community.kde.org/index.php?title=Real-Time_Communication_and_Collaboration/Components/Accounts_KCM_Tasks

Along with some further information about getting started here:
http://community.kde.org/Real-Time_Communication_and_Collaboration/Components/Accounts_KCM_Hack_Day