lkml.org 
[lkml]   [2008]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectgit snapshots (Was: Re: merging branches remotely with git?)
Hello,

> ps Which git represents the git patches (like 2.6.26-git11) which are
> placed as patches on the www.kernel.org web page under the section
> The latest snapshot for the stable Linux kernel tree is:.
AFAIK there is no public tree that contains these tags. But I have a
little script that creates them. See below.

Best regards
Uwe


#! /usr/bin/env python

import re
import sys
from urllib2 import urlopen, HTTPError
from subprocess import call

re_version = re.compile('v?(?P<version>2.6.[0-9]+(-rc[0-9]+)?)(?P<snapshot>-git[0-9]+)?')
re_hash = re.compile('[0-9a-f]{40}$')

def get(version):
url = 'http://kernel.org/pub/linux/kernel/v2.6/snapshots/patch-%s.id' % version
try:
f = urlopen(url)
id = f.read(41).strip()
print id
mo = re_hash.match(id)
if not mo:
return None

call(['git', 'tag', '--', 'v%s' % version, id])

except HTTPError:
print "could not find %s" % version
return None

for arg in sys.argv[1:]:
mo = re_version.match(arg)
if not mo:
print 'skip %r' % arg
continue
if mo.group('snapshot'):
get(mo.group('version') + mo.group('snapshot'))

--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-07-25 13:25    [W:2.876 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site