Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

r88951 - tracker/instances/python-dev/scripts/addpatchsets

 

 

Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

May 13, 2012, 11:23 AM

Post #1 of 1 (21 views)
Permalink
r88951 - tracker/instances/python-dev/scripts/addpatchsets

Author: martin.v.loewis
Date: Sun May 13 20:23:42 2012
New Revision: 88951

Log:
Ignore unparsable diff blocks - they might be binary diffs.


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 Sun May 13 20:23:42 2012
@@ -60,10 +60,8 @@
if line.startswith('diff '):
if filename:
chunks = patching.ParsePatchToChunks(diff)
- if not chunks:
- # diff cannot be parsed
- return None
- patches.append((filename, ''.join(diff), chunks))
+ if chunks:
+ patches.append((filename, ''.join(diff), chunks))
diff = []
filename = line.split()[-1]
if filename.startswith("b/"):
@@ -75,9 +73,8 @@
# add last patch
if filename:
chunks = patching.ParsePatchToChunks(diff)
- if not chunks:
- return None
- patches.append((filename, ''.join(diff), chunks))
+ if chunks:
+ patches.append((filename, ''.join(diff), chunks))
return patches

def find_bases(data):
@@ -92,6 +89,8 @@
c = connection.cursor()
pieces = hg_splitpatch(data)
if not pieces:
+ if verbose:
+ print "Splitting failed"
return None, None
bases = []
for filename, data, chunks in pieces:
_______________________________________________
Python-checkins mailing list
Python-checkins [at] python
http://mail.python.org/mailman/listinfo/python-checkins

Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.