gnome-shell moving to Git



As part of setting up git.gnome.org and exploring how we would
transition to this, we needed a handful modules using it for real.
gnome-shell was a good candidate because:

 - No translations
 - Many gnome-shell developers already using git-svn
 - The Clutter and Mutter dependencies are in git

NOTE: This move does not reflect a final commitment to move GNOME 
  to Git (though I think that's very likely at this point.)
  If we decide otherwise we'll deal with converting the git history
  of gnome-shell to the final VCS.

Pointers
========

If you are using jhbuild as recommended, you don't really need to know
the manual repository URLs, but they are:

  anonymous:       git://git.gnome.org/gnome-shell
  with an account: ssh://USERNAME git gnome org/git/gnome-shell

Web interface for browsing changes is:

  http://git.gnome.org/cgit/gnome-shell/
  
RSS feed of changes:

  http://git.gnome.org/cgit/gnome-shell/atom/

Learning GIT
============

http://git-scm.com/documentation has various resources including the
official tutorial:

 http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html

I think:

 http://cworth.org/hgbook-git/tour/
 
does a better job at introducing the concepts rather than just throwing
commands at you and at letting you figure it out from there. It hasn't
been updated for a while so it's possible there might be some out of
date information. But it's basically still good.

We're going to work on writing some good documentation with tips about
the cool features of GIT for GNOME generally, but here's just a few
things that are worth knowing once you get the hang of the basics:

 * Make sure your commit message is "subject" <blank line> "details"
   And read
http://lists.cairographics.org/archives/cairo/2008-September/015092.html

 * 'git add -p/--patch' allows you to commit only *some* of your local
   changes to a file.

 * 'git commit --amend' is really good for fixing up an "oops" commit
   before you send it off or push it.

 * 'git rebase -i/--interactive' is an incredibly powerful tool for
   reordering and squashing together commits.

And of course, if you have any questions hop on #gnome-shell and ask!

Moving over
===========

General:
 
  In your ~/.jhbuildrc, change the line:

    moduleset = 'http://svn.gnome.org/svn/gnome-shell/trunk/tools/build/gnome-shell.modules'

  To:

    moduleset = 'http://git.gnome.org/cgit/gnome-shell/plain/tools/build/gnome-shell.modules'

  In your ~/.jhbuildrc-custom, if you have a line like:

    repos["svn.gnome.org"] = "svn+ssh://USERNAME svn gnome org/svn/"

  Add another line:

    repos["git.gnome.org"] = "ssh://USERNAME git gnome org/git/"

If you have no outstanding changes:
 
   Follow the same procedure as with the clutter migration - double
   check you have no changes, rm -rf the gnome-shell directory
   under ~/gnome-shell/source before next running jhbuild.

If you have outstanding changes in svn:
(Untested, so if it breaks, use common sense and look for typos)

   # Back up your current directory and make a patch out of everything
   $ cd ~/gnome-shell/source
   $ mv gnome-shell gnome-shell.svn
   $ ( cd gnome-shell && svn diff ) > gnome-shell-svn-changes.patch

   [ If you have new files, it's slightly harder, but I don't think
     anybody does ]

   # Run jhbuild to check out the new git version
   $ jhbuild updateone gnome-shell

   # Apply your changes
   $ ( cd gnome-shell && patch -p0 ) < gnome-shell-svn-changes.patch
   
If you have outstanding changes in git-svn:
(Also untested)
  
   You probably are in a better position to figure it out for
   yourself, but here's one approach. First, commit any outstanding
   changes (you can use git-reset to uncommit them at the end if
   necessary.) Then move them from the git-svn tree to the real git
   checkout.

   # Get the new git checkout
   $ cd ~/gnome-shell/source
   $ mv gnome-shell gnome-shell.svn
   $ jhbuild updateone gnome-shell

   # Move any changes not committed to git-svn over
   $ ( cd gnome-shell.svn && git format-patch --stdout git-svn ) | \
     ( cd gnome-shell && git am )

   # If you want uncommit the last commit, and leave the changes in
   # it as local changes
   $ cd gnome-shell
   $ git reset HEAD^




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]