Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: gband on April 11, 2012, 08:12:36 PM

Title: Git Syntax
Post by: gband on April 11, 2012, 08:12:36 PM
What is the syntax in Git to download old source files?

I tried to get them from svn, but get an error.


svn checkout svn://svn.rockbox.org/rockbox/trunk -r r26927

svn: Can't connect to host 'svn.rockbox.org': Connection timed out
Title: Re: Git Syntax
Post by: saratoga on April 11, 2012, 08:16:52 PM
git checkout 'commit_hash'

If you don't know the hash, you can grep the git log or find it on the web interface. 
Title: Re: Git Syntax
Post by: torne on April 12, 2012, 05:40:45 AM
You need to clone the repository first, following the instructions on http://www.rockbox.org/wiki/UsingGit
Once you have a clone of the repository (which will be the latest version) you can check out a particular git hash with something like "git checkout 1a3bb83" (using the appropriate hash). If you want to find the git commit that corresponds to a particular old svn commit, one way to do this that's pretty easy is "git log --oneline --grep=@26927" (for the r26927 you quote), which will show you the commit in question, with the git hash at the start of the line.
Title: Re: Git Syntax
Post by: gband on April 12, 2012, 02:52:28 PM
Thanks for the clear instructions. 

After checking out the old source I get this error:

make: *** No rule to make target `/home/ubuntu/rockbox/firmware/asm/thread.h', needed by `/home/ubuntu/rockbox/build/apps/action.o'.  Stop.
Title: Re: Git Syntax
Post by: saratoga on April 12, 2012, 03:27:05 PM
Looking at the logs, r26928 fixes a build error in r26927, so that might be normal.  Alternatively, if you haven't rerun configure after reverting to an old check out, your build directory may be in a bad state.