Category: English

Git Again – Svn Workflow

On this page on the GNOME website I found how to use git properly if you are using it as a gateway to a svn:

  1. git svn clone _svn_server_location #Clone the repository
  2. git svn fetch #Download the stuff
  3. git svn rebase #Merge the updates with the current
  4. git checkout -b myfeature #Create a local branch
  5. hack hack hack # hack
  6. git commit -am "changed stuff" # Commit
  7. hack hack hack # hack
  8. git commit -am "changed other stuff" # Commit
  9. git checkout master # Change to master branch
  10. git merge --squash myfeauture #Merge myfeature to master
  11. git commit -am "merge the feature to the master"
  12. git svn dcommit # Commit everything on the svn server

More info about git in the previous posts

Some stuff about git you should know

Git rocks, and after two days of using I can confirm it.

I was a user of bazar, but with the switching of GNOME to git and the big trouble that bazar was giving me to commit on the svn of the EBI I decided to give to git a go.

Also on bioinfoblog the match between git and bazar it’s a though one, but I right now the svn support from git just works out of the box, so I started to use it.

I want also to point out that with the last git (ATMOW) is possible to create a remote branch on the svn server with:

git svn branch mybranch

and this was one of the killer feature that made me switch.

This is not a tutorial on git but I will provide you some quick and dirty pointers to other posts that I found interesting for a quick introduction to git.

Stuff to keep in mind about git:

  • You always work in a local branch.
  • You commit locally
  • You push (or dcommit if using a remote svn repository) to the remote branch.
  • The name of a remote branch is remote/foobar and you need to put the remote prefix also if it doesn’t show up with the remote prefix not optional. You need this if you create a local branch and you want to track a remote branch.

Some pointers here:

I’ve customized my bash prompt to show my current branch on a git repository. This is the code (based on some code found on the net that I can’t track anymore.. I’m sorry….) looks like this:

#git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/(1)/'
}
#grey
PS1='[33[0;32m]u[33[1;32m]@[33[0;32m]h[33[00m]:[33[01;34m]W[33[1;30m]$(parse_git_branch)[33[00m]$ '

The terminal looks like this
git prompt

GMail offline available

It was a long time that I was wondering when the offline service will be available….

Gears is out for a while, so the technology was there….

gmail offline
Today I discovered gmail offline becomes available from the lab.

Well, it’s the same idea of the readers offline… It’s really good stuff. Give it a go. You need gears and lab installed ๐Ÿ˜›

Ubuntu: Black screen at the login

Today I’ve got a black (sad) screen after restarting the computer. The boot process was fine but everything seems to hang when the nvidia drivers was supposed to kick in and Xorg start.

It was impossible to fall back to any console text login type.

I’ve searched the internet here and there, but I was not able to find any solution or bug report, so I come up with an workaround.

I think the problem is due to the new kernel that I’ve installed following one of the suggested update and the incompatibility with the nvidia drivers. I don’t know if it is the true problem, but I have an hint that this can be true.

As the matter of fact I’ve changed the kernel at the boot time  (Push Esc when GRUB is showing the timeout for the default choice) and I choose the previous version (i.e. Ubuntu 8.10, kernel 2.6.27-12-generic).

With this one I was able to login and my system seems to be completely functional, up and running again.

For the time being I decided to stick with this kernel.  I edited the grub menu list (/boot/grub/menu.lst) changing the default 0 (Ubuntu 8.10, kernel 2.6.27-13-generic) with the second option (Ubuntu 8.10, kernel 2.6.27-12-generic).

Here my current menu.lst


# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 2

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

...
TRIM
...

## ## End Default Options ##

title Ubuntu 8.10, kernel 2.6.27-13-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-13-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro quiet splash
initrd /boot/initrd.img-2.6.27-13-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-13-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-13-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro single
initrd /boot/initrd.img-2.6.27-13-generic

title Ubuntu 8.10, kernel 2.6.27-12-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-12-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro quiet splash
initrd /boot/initrd.img-2.6.27-12-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-12-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-12-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro single
initrd /boot/initrd.img-2.6.27-12-generic

### END DEBIAN AUTOMAGIC KERNELS LIST

Note that default 0 takes always the latest.
HIH.

Update: Found the BUG https://bugs.launchpad.net/ubuntu/+source/linux/+bug/337019/

Royal Mail random picking

So, I sent three letters three with the same quantity of stamps and I sent them from the same mail box.

One of them come back with a label claiming that:

“there isn’t enough postage on this Airmail item so we are returning it to you”

So why 2 of 3 were ok if it was the same postage from the same mailbox?

Who knows…. Maybe they are going to come back later on…

Nemo and tracker. To find stuff. Really

I’m always managing a lot of files on my computer and especially I always download a lot of new scientific papers.
I use referencer to manage my collections and i save the paper using the first name of the author and the year.

However I never remember the name of the author, but I only remember when I hit that paper and saved. So here where Nemo comes handy.

Nemo “is a cross between a calendar and a file browser with labels.” The index of your file is done using tracker as back end so you don’t need to install anything else on your linux box.

Here the screenshot to give you a better understanding

Nemo Screenshot

Nemo Screenshot

So I just have to select PDF and look what I have saved yesterday and “et voilเ” I found the stuff I was looking for.

If I select all the files of course it will find all the files.

Nemo All the files

Nemo All the files

Note the first screenshot that I made few minutes ago it’s already indexed by tracker and displayed by nemo.

Of course this will not replace the Nautilus o tracker GUI search, but it has its own ecological niche of use.