title: build a particular version of cyanogenmod (namely, 9.0.0-galaxys2)
body: <p>I want to build cyanogenmod 9.0.0 for samsung galaxy s2.
  I have read <a href="http://wiki.cyanogenmod.org/w/Build_for_i9100" rel="nofollow noreferrer">http://wiki.cyanogenmod.org/w/Build_for_i9100</a> and compiled the stuff successfully.
  But what has been built is cm-11, while I need 9.0.0. (I'm hunting a bug in the code written by another person, and I need this version to understand what is going on.)</p>
  
  <p>The command</p>
  
  <pre><code>$ repo init -u git://github.com/CyanogenMod/android.git -b cm-9.0.0
  </code></pre>
  
  <p>breaks with</p>
  
  <pre><code>error: in `init -u git://github.com/CyanogenMod/android.git --repo-url=https://gerrit.googlesource.com/git-repo --repo-branch=stable`: revision refs/heads/master in manifests not found
  </code></pre>
  
  <p>but the help says that <code>-b</code> specifies the <strong><em>manifest</strong> branch or revision</em>, so unless the description is misleading it should be possible to use the latest manifest and later checkout the necessary version.</p>
  
  <p>So I used the command</p>
  
  <pre><code>$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
  </code></pre>
  
  <p>But now I get:</p>
  
  <pre><code>$ repo branch
     (no branches)
  $ repo branches
     (no branches)
  </code></pre>
  
  <p>For comparison, in the directory where cm-11 has been built, I also get <code>(no branches)</code>.</p>
  
  <p>In <a href="https://stackoverflow.com/a/10820464/755804">https://stackoverflow.com/a/10820464/755804</a>
  I read that I should use a manifest file specific to the build in question, but where/how do I get it? (The file lists a revision for each of the git repositories in the repo tree; obtaining this list manually would be an odious task, there should be a script able to do this. Or maybe the files to repeat each build are stored somewhere and I just don't know where?)</p>
  
  <p>So: <strong><em>How do I check out a particular revision of Cyanogenmod source?</em></strong> (In particular, cm-9.0.0-galaxys2?)</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Found 
  <code>repo help forall</code> -- <em>run a shell command in each project.</em> <strong><em>BUT</em></strong> <code>repo forall -c 'git branch'</code> shows a <code>(no branch)</code> for each project. UPD: because it should be <code>repo forall -c git branch -a</code>, but the set of shown branches will depend on the parameter passed with the <code>-b</code> key to <code>repo init</code>.</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>The answer below shows how to checkout the sources. The next step is to run <code>breakfast i9100</code> (what a stupid non-descriptive name!) Unfortunately, it does not work because since some moment in the past github api began to require application authentication (and the no-auth quote is not enough for <code>breakfast</code>). Thus, <em>a change in github access policy has broken a version control script and in fact has turned the commit history into useless old rubbish: one cannot rebuild the old version. I would say, it's an epic fail of the version control systems in general: it turned out that a version control system cannot replace a directory with zipped copies of the source tree. (And the amount of sub-projects and the use of a 3rd-party script to manage them are key components in that failure.)</em></p>