From: "Uwe Kleine-König" <ukleinek@informatik.uni-freiburg.de>
To: Rene Herman <rene.herman@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Greg KH <greg@kroah.com>,
git@vger.kernel.org
Subject: Re: GIT and the current -stable
Date: Sat, 14 Apr 2007 13:56:00 +0200 [thread overview]
Message-ID: <20070414115600.GA10995@informatik.uni-freiburg.de> (raw)
In-Reply-To: <46206842.80203@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
Hello Rene,
Rene Herman wrote:
> each time that a new -stable is released. Rather though, I'd like a simple
> "git pull" to do this while on this branch while a "git pull" while back on
> the master branch pulls from the originally cloned Linus repo again.
>
> Is this possible? Do I want it to be? Comments like "work like this
> instead" welcome as well; figuring out what the heck it is that I want from
> git seems to be one of the most difficult questions to answer...
Chris' mail made that somehow superfluous but anyhow. I have a Python
script to update my Linux tree. It's attached.
It automatically adds
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.x.y as a
remote as soon as v2.6.x is seen in Linus' repo and then fetches 2.6.16,
2.6.(last - 1) and 2.6.last. If you want to fetch all, change
for stable in (16, last_stable - 1, last_stable):
in
for stable in xrange(16, last_stable + 1):
The location of the repo is hardcoded to $HOME/gsrc/linux-2.6, but I
think everyone with a bit of intuition should be able to change that ...
So it's not a "git pull" for me, but "update-linux".
Best regards
Uwe
--
Uwe Kleine-König
main(){char*a="main(){char*a=%c%s%c;printf(a,34,a,34%c";printf(a,34,a,34
,10);a=",10);a=%c%s%c;printf(a,34,a,34,10);}%c";printf(a,34,a,34,10);}
[-- Attachment #2: update-linux --]
[-- Type: text/plain, Size: 1832 bytes --]
#! /usr/bin/env python
import os, re, subprocess, sys
silent = False
git_dir = os.path.join(os.getenv('HOME'), 'gsrc', 'linux-2.6', '.git')
os.putenv('GIT_DIR', git_dir)
devnull = open('/dev/null', 'w', 0)
if silent:
subprocess_stdout = devnull
else:
subprocess_stdout = None
if not silent:
print 'fetch origin'
subprocess.call(['git-fetch', 'origin'], stdout=subprocess_stdout)
sp_describe = subprocess.Popen(['git-describe', 'origin'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sp_describe_stdin, sp_describe_stderr = sp_describe.communicate()
re_linuxver = re.compile('v2\.6\.(?P<minor>\d+)(?P<stable>\.\d+)?(?P<rc>-rc\d+)?(?P<git>-g[0-9a-fA-F]+)?')
mo = re_linuxver.match(sp_describe_stdin)
if not mo:
print 'cannot parse version of origin\'s HEAD'
sys.exit(1)
modict = mo.groupdict()
if modict['rc'] and not modict['stable']:
last_stable = int(modict['minor']) - 1
else:
last_stable = int(modict['minor'])
for stable in (16, last_stable - 1, last_stable):
if subprocess.call(['git', 'repo-config', 'remote.v2.6.%d.y.url' % stable], stdout=devnull) != 0:
subprocess.call(['git', 'repo-config', 'remote.v2.6.%d.y.url' % stable, 'git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.%d.y.git' % stable])
subprocess.call(['git', 'repo-config', 'remote.v2.6.%d.y.fetch' % stable, 'refs/heads/master:refs/remotes/stable/v2.6.%d.y' % stable])
subprocess.call(['git', 'repo-config', 'branch.v2.6.%d.y.remote' % stable, 'v2.6.%d.y' % stable])
subprocess.call(['git', 'repo-config', 'branch.v2.6.%d.y.remote' % stable, 'v2.6.%d.y' % stable])
subprocess.call(['git', 'repo-config', 'branch.v2.6.%d.y.merge' % stable, 'refs/heads/master'])
if not silent:
print 'fetch v2.6.%d.y' % stable
subprocess.call(['git-fetch', 'v2.6.%d.y' % stable], stdout=subprocess_stdout)
prev parent reply other threads:[~2007-04-14 11:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-14 5:36 Rene Herman
2007-04-14 6:24 ` Junio C Hamano
2007-04-14 7:13 ` Rene Herman
2007-04-14 7:21 ` Greg KH
2007-04-14 17:34 ` Linus Torvalds
2007-04-14 18:45 ` Gerb Stralko
2007-04-14 8:34 ` Chris Wright
2007-04-14 8:54 ` Rene Herman
2007-04-14 23:13 ` Rene Herman
2007-04-15 0:23 ` Julian Phillips
2007-04-14 15:15 ` Brian Gernhardt
2007-04-14 17:19 ` Chris Wright
2007-04-14 17:23 ` Brian Gernhardt
2007-04-14 17:31 ` Chris Wright
2007-04-14 19:07 ` Julian Phillips
2007-04-14 11:56 ` Uwe Kleine-König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070414115600.GA10995@informatik.uni-freiburg.de \
--to=ukleinek@informatik.uni-freiburg.de \
--cc=git@vger.kernel.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rene.herman@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®