From: Steven Rostedt <rostedt@goodmis.org>
To: Matt Mackall <mpm@selenic.com>
Cc: Esben Nielsen <simlo@phys.au.dk>,
Michal Schmidt <xschmi00@stud.feec.vutbr.cz>,
linux-kernel@vger.kernel.org
Subject: [ketchup] patch to alt urls for local trees
Date: Fri, 28 Oct 2005 09:35:46 -0400 [thread overview]
Message-ID: <1130506546.9574.62.camel@localhost.localdomain> (raw)
In-Reply-To: <1130504043.9574.56.camel@localhost.localdomain>
Hi Matt,
Here's another patch. This one allows for local alternative url paths.
As you know, I use ketchup for Thomas Gleixner's ktimers. He also
stores his archives differently than everyone else. So I have as
my .ketchuprc the following.
local_trees = {
'2.6-kt': (latest_dir,
"http://www.tglx.de/projects/ktimers/patch-%(full)s.patch",
r'patch-(2.6.*?)',
0, "Thomas Gleixner's ktimers."),
'2.6-kthrt': (latest_dir,
"http://www.tglx.de/projects/ktimers/patch-%(full)s.patch",
r'patch-(2.6.*?)',
0, "Thomas Gleixner's ktimers and HRT patches.")
}
local_alturls = {
'/ktimers/' : "/ktimers/archive/"
}
With the below patch to grab the older ktimer patches.
Now, I would like to let you know that I've only written one program in
python for all my life. So I am not very comfortable writing code for
it. So if you can clean this up, I wouldn't mind. For now, this works
for me.
-- Steve
Index: Ketchup-d9503020b3c1/ketchup
===================================================================
--- Ketchup-d9503020b3c1.orig/ketchup 2005-10-28 08:48:37.000000000 -0400
+++ Ketchup-d9503020b3c1/ketchup 2005-10-28 09:27:31.000000000 -0400
@@ -89,6 +89,7 @@
precommand = postcommand = None
default_tree = None
local_trees = {}
+local_alturls = {}
def qprint(*args):
if not options["quiet"]:
@@ -355,6 +356,9 @@
# the jgarzik memorial hack
url2 = re.sub("/snapshots/", "/snapshots/old/", url)
url2 = re.sub("/realtime-preempt/", "/realtime-preempt/older/", url2)
+ for exp,rep in local_alturls.items():
+ if url2 != url: break
+ url2 = re.sub(exp, rep, url2)
if url2 != url:
if download(url2, file): return file
if url2[-4:] == ".bz2":
next prev parent reply other threads:[~2005-10-28 13:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-17 7:38 ketchup+rt with ktimers added Steven Rostedt
2005-10-17 21:39 ` Matt Mackall
2005-10-18 6:20 ` Steven Rostedt
2005-10-18 6:30 ` Matt Mackall
2005-10-18 6:45 ` Steven Rostedt
2005-10-18 7:29 ` Matt Mackall
2005-10-28 12:54 ` [ketchup] patch to allow for moving of .gitignore in 2.6.14 Steven Rostedt
2005-10-28 13:35 ` Steven Rostedt [this message]
2005-10-28 17:00 ` [ketchup] patch to alt urls for local trees Matt Mackall
2005-10-28 20:46 ` Steven Rostedt
2005-10-30 19:53 ` Matt Mackall
2005-10-28 14:49 ` [ketchup] patch to allow for moving of .gitignore in 2.6.14 Steven Rostedt
2005-10-29 21:06 ` Steven Rostedt
2005-10-29 21:06 ` Matt Mackall
2005-10-29 23:56 ` Steven Rostedt
2005-10-30 1:19 ` David Weinehall
2005-10-30 2:10 ` Steven Rostedt
2005-10-30 3:48 ` Steven Rostedt
2005-10-30 6:56 ` Patrick McFarland
2005-10-30 17:59 ` Matt Mackall
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=1130506546.9574.62.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=simlo@phys.au.dk \
--cc=xschmi00@stud.feec.vutbr.cz \
/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