All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Matt Mackall <mpm@selenic.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] ketchup - support new -post releases
Date: Fri, 20 Aug 2004 10:06:48 -0700	[thread overview]
Message-ID: <1093021608.15662.1228.camel@nighthawk> (raw)

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

Since 2.6.8.1 came out, I'm sure a lot of automated tools stopped
working, ketchup included. 

I'm sure this patch isn't complete, but it does work to patch from 2.6.8
-> 2.6.8.1 or 2.6.8.1-mm*, so it is at least a start. 

-- Dave

[-- Attachment #2: ketchup-postvers.patch --]
[-- Type: text/x-patch, Size: 2333 bytes --]

--- ketchup-0.8.orig	2004-08-16 15:42:28.000000000 -0700
+++ ketchup-0.8	2004-08-20 10:03:05.000000000 -0700
@@ -126,35 +126,42 @@
     return r
 
 def pre(ver):
-    try: return re.match(r'\d+\.\d+\.\d+-((rc|pre)\d+)', ver).group(1)
+    try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(2)
+    except: return None
+
+def post(ver):
+    try: return re.match(r'(\d+\.\d+\.\d+\.\d+)', ver).group(1)
     except: return None
 
 def pretype(ver):
-    try: return re.match(r'\d+\.\d+\.\d+-((rc|pre)\d+)', ver).group(2)
+    try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(3)
     except: return None
 
 def prenum(ver):
-    try: return int(re.match(r'\d+\.\d+\.\d+-((rc|pre)(\d+))', ver).group(3))
+    try: return int(re.match(r'\d+\.\d+\.\d+-((rc|pre)(\d+))', ver).group(4))
     except: return None
 
 def prebase(ver):
-    return re.match(r'(\d+\.\d+\.\d+(-(rc|pre)\d+)?)', ver).group(1)
+    return re.match(r'(\d+\.\d+\.\d+((-(rc|pre)|\.)\d+)?)', ver).group(1)
 
 def base(ver):
-    return "%s.%s" % (tree(ver), rev(ver))
+    if post(ver):
+	return prebase(ver)
+    else:
+    	return "%s.%s" % (tree(ver), rev(ver))
 
 def forkname(ver):
-    try: return re.match(r'\d+.\d+.\d+(-(rc|pre)\d+)?(-(\w+?)\d+)?',
-                         ver).group(4)
+    try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+?)\d+)?',
+                         ver).group(5)
     except: return None
 
 def forknum(ver):
-    try: return int(re.match(r'\d+.\d+.\d+(-(rc|pre)\d+)?(-(\w+?)(\d+))?',
-                             ver).group(5))
+    try: return int(re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+?)(\d+))?',
+                             ver).group(6))
     except: return None
 
 def fork(ver):
-    try: return re.match(r'\d+.\d+.\d+(-(rc|pre)\d+)?(-(\w+))?', ver).group(4)
+    try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+))?', ver).group(4)
     except: return None
 
 def get_ver(makefile):
@@ -484,6 +491,11 @@
         if pre(a):
             apply_patch(a, 1)
             a = base(a)
+	# need a loop here to apply all of the post patches
+	if post(b):
+	    apply_patch(prebase(b), 0)
+	# need a loop here to back out any a post patches
+	    
         ra, rb = rev(a), rev(b)
         if ra > rb:
             for r in range(ra, rb, -1):

             reply	other threads:[~2004-08-20 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-20 17:06 Dave Hansen [this message]
2004-08-20 19:38 ` ketchup versus patch-kernel Sam Ravnborg
2004-08-20 17:47   ` Dave Hansen
2004-08-21 14:14 ` [PATCH] ketchup - support new -post releases 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=1093021608.15662.1228.camel@nighthawk \
    --to=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.