[Python-checkins] r88780 - tracker/instances/python-dev/scripts/addpatchsets

martin.v.loewis python-checkins at python.org
Tue Mar 15 21:52:14 CET 2011


Author: martin.v.loewis
Date: Tue Mar 15 21:52:14 2011
New Revision: 88780

Log:
Strip leading text off patch.


Modified:
   tracker/instances/python-dev/scripts/addpatchsets

Modified: tracker/instances/python-dev/scripts/addpatchsets
==============================================================================
--- tracker/instances/python-dev/scripts/addpatchsets	(original)
+++ tracker/instances/python-dev/scripts/addpatchsets	Tue Mar 15 21:52:14 2011
@@ -78,6 +78,10 @@
     return patches
 
 def find_bases(data):
+    if not data.startswith("diff -r "):
+        # this should only be called if there is actually is a diff in the file
+        head, tail = data.split("\ndiff -r ", 1)
+        data = "diff -r "+tail
     first, second, rev = data.split()[:3]
     if first != 'diff' or second != '-r' or len(rev) != 12:
         return None, None


More information about the Python-checkins mailing list