Author: ayoung
Date: Thu Mar 22 06:35:34 2012
New Revision: 9670

URL: http://svn.slimdevices.com/jive?rev=9670&view=rev
Log:
Stash revision count in .git_revision_count file in checkout

Modified:
    7.8/trunk/squeezeos/poky/bitbake/lib/bb/fetch/git.py

Modified: 7.8/trunk/squeezeos/poky/bitbake/lib/bb/fetch/git.py
URL: 
http://svn.slimdevices.com/jive/7.8/trunk/squeezeos/poky/bitbake/lib/bb/fetch/git.py?rev=9670&r1=9669&r2=9670&view=diff
==============================================================================
--- 7.8/trunk/squeezeos/poky/bitbake/lib/bb/fetch/git.py (original)
+++ 7.8/trunk/squeezeos/poky/bitbake/lib/bb/fetch/git.py Thu Mar 22 06:35:34 
2012
@@ -138,12 +138,19 @@
         os.chdir(repodir)
         runfetchcmd("git read-tree %s%s" % (ud.tag, readpathspec), d)
         runfetchcmd("git checkout-index -q -f --prefix=%s -a" % 
(os.path.join(codir, subdir, "")), d)
+        count = runfetchcmd("git rev-list %s -- | wc -l" % (ud.tag), d, True)
 
         bb.utils.unlockfile(lf)
 
         os.chdir(codir)
+
+        bb.msg.note(1, bb.msg.domain.Fetcher, "Checkins count: %s" % count)
+        f = open(os.path.join(subdir, '.git_revision_count'), 'w')
+        f.write(count)
+        f.close()
+
         bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git 
checkout")
-        runfetchcmd("tar -czf %s %s" % (ud.localpath, os.path.join(".", "*") 
), d)
+        runfetchcmd("tar -czf %s %s" % (ud.localpath,  os.path.join(".", "*") 
), d)
 
         os.chdir(repodir)
         bb.utils.prunedir(codir)

_______________________________________________
Jive-checkins mailing list
Jive-checkins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to