Sandro Tosi: Mercurial: how to completely remove a named branch
I like so much the git feature branch workflow, that in the early days of development on Python with Mercurial I created some named branches; well, that is something you should not do.
In Mercurial, the changeset contains the branch name, so you cannot develop on a separated (named) branch and then merge on default and hope that branch goes away, because it will stay.
What do I do now? Python Mercurial repository is quite big (around 200Megs) so I wanted to avoid to re-check it out. Thanks to the help of the folks on #mercurial (on freenode IRC network) I found my solution: strip the branch!
Please note that strip is dangerous. Use it only as last resort, and mind you can lose data with it. That said, it's a very powerful tool :) My main aim was to remove completely those named branches, leave no traces, and lose the changes I made on them. Another important aspect is that I didn't merged those branches on default.
So, how to get rid of a named branch:
$ hg strip "branch($ BRANCHNAME )"
and re-iterate for all the branches you have, that's it. Now, to be completely sure they were removed and no spurious changes are in the repository, you can:
$ hg pull -u
$ hg outgoing
and if it says "no changes found" you're sure that those branches are really gone.
In Mercurial, the changeset contains the branch name, so you cannot develop on a separated (named) branch and then merge on default and hope that branch goes away, because it will stay.
What do I do now? Python Mercurial repository is quite big (around 200Megs) so I wanted to avoid to re-check it out. Thanks to the help of the folks on #mercurial (on freenode IRC network) I found my solution: strip the branch!
Please note that strip is dangerous. Use it only as last resort, and mind you can lose data with it. That said, it's a very powerful tool :) My main aim was to remove completely those named branches, leave no traces, and lose the changes I made on them. Another important aspect is that I didn't merged those branches on default.
So, how to get rid of a named branch:
$ hg strip "branch($ BRANCHNAME )"
and re-iterate for all the branches you have, that's it. Now, to be completely sure they were removed and no spurious changes are in the repository, you can:
$ hg pull -u
$ hg outgoing
and if it says "no changes found" you're sure that those branches are really gone.
Linux will be 20 years old this year. I've been drafting an outline
for an article of my memories of the early days, but that's
going to take a lot of writing before it is ready.
Just in case I don't finish the article, I'll point at
Thanks to the tremendous growth of social applications over the past five years, we have our pick of services for collecting, saving and sharing our experiences online. We each have collections of photos, contacts, messages and more, spread across multiple popular services like Twitter, Facebook, LinkedIn, as well as many less popular services which address particular needs or preferences. We re also producing a wealth of exhaust data through our browsing history, mobile sensors, transactions and other activity streams that we rarely if ever examine directly.
This ecosystem is becoming so complex that it s easy to lose track of what you ve created, shared or seen. We need new tools to manage this complexity, to make the most of the wealth of information and connections available to us through various services. John Battelle calls these
Yesterday I begun using Debian GNU/kFreeBSD squeeze in
Wondering what is going on with the port of Debian to the Minix 3 microkernal? Here's an update.
dpkg Ported
Well, the big news as I mentioned in
It has been a long time I want to prepare a

Sometime it happens, that there are school holidays. As my lovely girl used to be a teacher, she has some time off at that period. So she left me with our kids yesterday to visit the grandparents.


The first day of the Desktop Summit was yesterday, Saturday, August 6. I loved it and gave a presentation. There are two very different stories I can tell on the topic of gender equality in
free software. I'll start with the bad.
I got a call from Mum today to inform me that my grandmother had passed away
last night, Brisbane time, at 94 years of age.
FreedomBox activities at Debconf11
I spent the last two weeks of July 2011 in Banja Luka. The occasion was the
annual
When you care for somebody, it is difficult to tell them "no." When
you trust somebody, you will tell them.
Hello, this is the fourth report for the project. First, I d like to