[Python-checkins] r88771 - tracker/instances/python-dev/scripts/addpatchsets
martin.v.loewis
python-checkins at python.org
Sun Mar 13 18:16:47 CET 2011
Author: martin.v.loewis
Date: Sun Mar 13 18:16:47 2011
New Revision: 88771
Log:
Support empty bases.
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 Mar 13 18:16:47 2011
@@ -38,10 +38,14 @@
try:
r = urllib2.urlopen("http://hg.python.org/cpython/raw-file/"+rev+"/"+filename)
except urllib2.HTTPError:
- return None
- base = engine.UnifyLinebreaks(r.read())
+ # not found/not accessible
+ # assume that the file did not exist in the base revision
+ # and consider it empty. If the problem was different (i.e. there should have
+ # been a non-empty base, patching will fail.
+ base = ""
+ else:
+ base = engine.UnifyLinebreaks(r.read())
lines = base.splitlines(True)
- #import pdb; pdb.set_trace()
for (start, end), newrange, oldlines, newlines in chunks:
if lines[start:end] != oldlines:
if verbose:
More information about the Python-checkins
mailing list